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:3804ʿAlī b. Muḥammad > Wakīʿ > Mūsá b. ʿUbaydah > Muḥammad b. Thābit > Abū Hurayrah

the Prophet ﷺ used to say: "Al-hamdu lillahi 'ala kulli hal. Rabbi a'udhu bika min hali ahlin-nar (Praise is to Allah in all circumstances, O Allah, I seek refuge with You from the situation of the people of Hell)."  

ابن ماجة:٣٨٠٤حَدَّثَنَا عَلِيُّ بْنُ مُحَمَّدٍ حَدَّثَنَا وَكِيعٌ عَنْ مُوسَى بْنِ عُبَيْدَةَ عَنْ مُحَمَّدِ بْنِ ثَابِتٍ عَنْ أَبِي هُرَيْرَةَ

أَنَّ النَّبِيَّ ﷺ كَانَ يَقُولُ الْحَمْدُ لِلَّهِ عَلَى كُلِّ حَالٍ رَبِّ أَعُوذُ بِكَ مِنْ حَالِ أَهْلِ النَّارِ  


See similar narrations below:

Collected by Suyūṭī