The short answer
Sunni Muslims especially rely on six major collections: Sahih al-Bukhari, Sahih Muslim, and the Sunan works of Abu Dawud, at-Tirmidhi, an-Nasa'i and Ibn Majah. Earlier works such as Imam Malik's Muwatta and Imam Ahmad's Musnad are also highly valued, and later scholars such as an-Nawawi compiled popular anthologies like the Forty Hadith and Riyad as-Salihin.
The detail
In the first two centuries of Islam, hadith were memorised and recorded in personal notebooks by Companions and their students. Gradually scholars began arranging this material into organised books, and over time some of these books became the standard references studied in mosques and colleges.
Early foundational works. The Muwatta of Imam Malik of Madinah is among the earliest surviving organised collections, combining the Prophet's hadith with the practice of the people of Madinah and the views of Companions. The Musnad of Imam Ahmad ibn Hanbal is a vast collection arranged by the Companion who narrated each report.
The Six Books. Sunni scholars came to treat six collections as the core references:
- Sahih al-Bukhari and Sahih Muslim, compiled in the third Islamic century by Muhammad ibn Isma'il al-Bukhari and Muslim ibn al-Hajjaj, who included only reports meeting their strict conditions. Scholars regard these two as the most reliable books after the Quran.
- The Sunan of Abu Dawud, at-Tirmidhi, an-Nasa'i and Ibn Majah, arranged mainly by legal topic. These contain many authentic reports and some weaker ones, and their compilers or later scholars often commented on the grades.
Later anthologies. Centuries later, scholars selected and arranged hadith for teaching and daily life. Imam an-Nawawi, a Shafi'i scholar of Damascus, compiled the Forty Hadith, a short set of foundational narrations, and Riyad as-Salihin (Gardens of the Righteous), arranged by themes of character and worship. Both draw heavily on the major collections, and both are available in this site's hadith library. Fittingly, both al-Bukhari's Sahih and an-Nawawi's Forty open with the hadith that actions are judged by intentions.
Primary references
The Quran and hadith this answer rests on, quoted from the stored texts with their references.
From the hadith
Each hadith is quoted as stored, with its collection, number and the reference and grade the edition gives.
Actions are judged by intentions
It is narrated on the authority of Amirul Mu'minin, Abu Hafs 'Umar bin al-Khattab (ra) who said: I heard the Messenger of Allah (ﷺ) say: "Actions are (judged) by motives (niyyah), so each man will have what he intended. Thus, he whose migration (hijrah) was to Allah and His Messenger, his migration is to Allah and His Messenger; but he whose migration was for some worldly thing he might gain, or for a wife he might marry, his migration is to that for which he migrated."
Show the Arabic
عَنْ أَمِيرِ الْمُؤْمِنِينَ أَبِي حَفْصٍ عُمَرَ بْنِ الْخَطَّابِ رَضِيَ اللهُ عَنْهُ قَالَ: سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ: " إنَّمَا الْأَعْمَالُ بِالنِّيَّاتِ، وَإِنَّمَا لِكُلِّ امْرِئٍ مَا نَوَى، فَمَنْ كَانَتْ هِجْرَتُهُ إلَى اللَّهِ وَرَسُولِهِ فَهِجْرَتُهُ إلَى اللَّهِ وَرَسُولِهِ، وَمَنْ كَانَتْ هِجْرَتُهُ لِدُنْيَا يُصِيبُهَا أَوْ امْرَأَةٍ يَنْكِحُهَا فَهِجْرَتُهُ إلَى مَا هَاجَرَ إلَيْهِ". رَوَاهُ إِمَامَا الْمُحَدِّثِينَ أَبُو عَبْدِ اللهِ مُحَمَّدُ بنُ إِسْمَاعِيل بن إِبْرَاهِيم بن الْمُغِيرَة بن بَرْدِزبَه الْبُخَارِيُّ الْجُعْفِيُّ [رقم:1]، وَأَبُو الْحُسَيْنِ مُسْلِمٌ بنُ الْحَجَّاج بن مُسْلِم الْقُشَيْرِيُّ النَّيْسَابُورِيُّ [رقم:1907] رَضِيَ اللهُ عَنْهُمَا فِي "صَحِيحَيْهِمَا" اللذَينِ هُمَا أَصَحُّ الْكُتُبِ الْمُصَنَّفَةِ
Further sources
Written for Islamic Portal from the hadith cited above and the well-known history of hadith compilation.
What scholars say
Being in one of these books does not by itself make a report authentic, except for the two Sahih collections, whose contents scholars broadly accepted after centuries of review. For the Sunan works, specialists look at each report's chain. Shia Muslims have their own hadith collections, compiled through their own chains and principles, which is one of the reasons the two traditions differ on some practices.
In practice
- A beginner might start with an-Nawawi's Forty Hadith, then move on to Riyad as-Salihin for everyday character and worship.
- A student researching a fiqh question would consult the Sunan works, which are arranged by topics such as purification, prayer and fasting.
Common misunderstandings
- Everything in the Six Books is equally authentic. Al-Bukhari and Muslim are in a class of their own; the other four contain reports of differing strength, which scholars grade individually.
- Hadith collections are a later invention unrelated to the Prophet. The compilers drew on earlier written notebooks and memorised transmissions, and recorded the chain of narrators for every report.
Check your understanding
Try to explain the answer in two sentences, in your own words, as if to a friend. Then read the short answer again and compare.
Suggested lessons
Courses, lessons and guides that teach this topic step by step.
Review and provenance
- Written by
- Islamic Portal editorial team
- Added
- 10 November 2026
Corrections
No corrections have been needed.
