Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ibnmajah:1212ʿAlī b. Muḥammad > Wakīʿ > Misʿar > Manṣūr > Ibrāhīm > ʿAlqamah > ʿAbdullāh

“The Messenger of Allah ﷺ said: ‘If anyone of you is uncertain about his prayer, let him try to do what is correct then let him prostrate twice.’” Tanafisi said: "This is the basic rule, and no one is able to reject it."  

ابن ماجة:١٢١٢حَدَّثَنَا عَلِيُّ بْنُ مُحَمَّدٍ حَدَّثَنَا وَكِيعٌ عَنْ مِسْعَرٍ عَنْ مَنْصُورٍ عَنْ إِبْرَاهِيمَ عَنْ عَلْقَمَةَ عَنْ عَبْدِ اللَّهِ قَالَ قَالَ

رَسُولُ اللَّهِ ﷺ إِذَا شَكَّ أَحَدُكُمْ فِي الصَّلاَةِ فَلْيَتَحَرَّ الصَّوَابَ ثُمَّ يَسْجُدْ سَجْدَتَيْنِ قَالَ الطَّنَافِسِيُّ هَذَا الأَصْلُ وَلاَ يَقْدِرُ أَحَدٌ يَرُدُّهُ  


See similar narrations below:

Collected by Ibn Ḥibbān, Ṭabarānī

ذِكْرُ الْبَيَانِ بِأَنَّ الْأَمْرَ بِسَجْدَتَيِ السَّهْوِ لِلتَّحَرِّي فِي شَكِّهِ فِي الصَّلَاةِ إِنَّمَا أُمِرَ بِهَا بَعْدَ السَّلَامِ لَا قَبْلُ

ibnhibban:2659ʿAbdullāh b. Muḥammad al-Azdī > Isḥāq b. Ibrāhīm > ʿUbayd b. Saʿīd al-Umawī > Sufyān > Manṣūr > Ibrāhīm > ʿAlqamah > ʿAbdullāh

[Machine] From the Messenger of Allah ﷺ , he said: "If any of you is doubtful about his prayer, let him correct it, then let him offer the salutation, and then let him prostrate twice."  

ابن حبّان:٢٦٥٩أَخْبَرَنَا عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ الْأَزْدِيُّ قَالَ حَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ قَالَ أَخْبَرَنَا عُبَيْدُ بْنُ سَعِيدٍ الْأُمَوِيُّ قَالَ حَدَّثَنَا سُفْيَانُ عَنْ مَنْصُورٍ عَنْ إِبْرَاهِيمَ عَنْ عَلْقَمَةَ عَنْ عَبْدِ اللَّهِ

عَنْ رَسُولِ اللَّهِ ﷺ قَالَ «إِذَا شَكَّ أَحَدُكُمْ فِي صَلَاتِهِ فَلْيَتَحَرَّ الصَّوَابَ ثُمَّ لْيُسَلِّمْ ثُمَّ لْيَسْجُدْ سَجْدَتَيْنِ»  

tabarani:9833al-Ḥusayn b. Isḥāq al-Tustarī > Muḥammad b. Ḥumayd > Yaḥyá b. Ḍurays > Sufyān > Abū Ḥaṣīn > Ibrāhīm > ʿAlqamah > ʿAbdullāh

[Machine] The Messenger of Allah ﷺ said, "If anyone of you is in doubt about what he has written, then he should consider carefully and then prostrate in the sajda of forgetfulness."  

الطبراني:٩٨٣٣حَدَّثَنَا الْحُسَيْنُ بْنُ إِسْحَاقَ التُّسْتَرِيُّ ثنا مُحَمَّدُ بْنُ حُمَيْدٍ ثنا يَحْيَى بْنُ ضُرَيْسٍ ثنا سُفْيَانُ عَنْ أَبِي حَصِينٍ عَنْ إِبْرَاهِيمَ عَنْ عَلْقَمَةَ عَنْ عَبْدِ اللهِ قَالَ

قَالَ رَسُولُ اللهِ ﷺ «إِذَا شَكَّ أَحَدُكُمْ فِي الْمَكْتُوبَةِ فَلْيَتَحَرَّ ثُمَّ يَسْجُدْ سَجْدَتَيِ السَّهْوِ»  

tabarani:9834Muḥammad b. ʿUthmān b. Abū Shaybah from my father > Muʿāwiyah b. Hishām > Sufyān > Ḥuṣayn > Ibrāhīm > ʿAlqamah > ʿAbdullāh

[Machine] The Messenger of Allah ﷺ said, "If any one of you doubts his prayer, then he should strive to do what is right and perform two prostrations of forgetfulness while sitting."  

الطبراني:٩٨٣٤حَدَّثَنَا مُحَمَّدُ بْنُ عُثْمَانَ بْنِ أَبِي شَيْبَةَ حَدَّثَنِي أَبِي ثنا مُعَاوِيَةُ بْنُ هِشَامٍ ثنا سُفْيَانُ عَنْ حُصَيْنٍ عَنْ إِبْرَاهِيمَ عَنْ عَلْقَمَةَ عَنْ عَبْدِ اللهِ قَالَ

قَالَ رَسُولُ اللهِ ﷺ «إِذَا شَكَّ أَحَدُكُمْ فِي صَلَاتِهِ فَلْيَتَحَرَّ الصَّوَابَ وَلْيَسْجُدْ سَجْدَتَيِ السَّهْوِ وَهُوَ جَالِسٌ»