Duas for entering the house, the mosque and the toilet

Quick answer: Sahih Muslim reports that the Prophet Muhammad ﷺ taught mentioning Allah’s name on entering the house, and a short supplication for entering and leaving the mosque. Sahih al-Bukhari reports the words he ﷺ used before entering the toilet. Each is said once at the threshold, and none of the texts gives a number of repetitions.

The wording for leaving the house and for leaving the toilet is well known, but it comes from collections outside Bukhari and Muslim. This article describes those situations in prose and does not quote them.

The three doorways at a glance

Situation When it is said Source quoted here
Entering the house At the door, mentioning Allah’s name (and again over food) Sahih Muslim 2018a
Leaving the house As you step out Wording rests on another collection, not quoted
Entering the mosque As you step in Sahih Muslim 713a
Leaving the mosque As you step out Sahih Muslim 713a
Before the toilet Before entering, not inside Sahih al-Bukhari 142
After the toilet After leaving Wording rests on another collection, not quoted
Starting with the right side For clean, good acts in general Sahih al-Bukhari 168

Entering the house

Jabir ibn Abdullah (may Allah be pleased with him) reported what the Prophet ﷺ said about a person who comes home. Sahih Muslim 2018a records it in the chapter on the etiquette of eating and drinking.

إِذَا دَخَلَ الرَّجُلُ بَيْتَهُ فَذَكَرَ اللَّهَ عِنْدَ دُخُولِهِ وَعِنْدَ طَعَامِهِ قَالَ الشَّيْطَانُ لاَ مَبِيتَ لَكُمْ وَلاَ عَشَاءَ . وَإِذَا دَخَلَ فَلَمْ يَذْكُرِ اللَّهَ عِنْدَ دُخُولِهِ قَالَ الشَّيْطَانُ أَدْرَكْتُمُ الْمَبِيتَ . وَإِذَا لَمْ يَذْكُرِ اللَّهَ عِنْدَ طَعَامِهِ قَالَ أَدْرَكْتُمُ الْمَبِيتَ وَالْعَشَاءَ

Jabir b. 'Abdullah reported Allah's Messenger (ﷺ) as saying:When a person enters his house and mentions the name of Allah at the time of entering it and while eating the food, Satan says (addressing himself: You have no place to spend the night and no evening meal; but when he enters without mentioning the name of Allah, the Satan says: You have found a place to spend the night, and when he does not mention the name of Allah while eating food, he (the Satan) says: You have found a place to spend the night and evening meal

The Encyclopedia of Translated Prophetic Hadiths explains the report as saying “Bismillah” (in the name of Allah) on entering and before eating. In the report, Satan speaks to his helpers and tells them there is no place to spend the night and no supper in that home.

The text has two parts: the doorway and the table. A person who forgets at the door can still mention Allah’s name when the food arrives, and the report mentions both moments.

A longer supplication for entering the house, attributed to Abu Malik al-Ash’ari (may Allah be pleased with him), is widely quoted online. It is not in Bukhari or Muslim and is not quoted here.

On the foot to lead with, a Hanafi fatwa published on IslamQA (IslamicPortal.co.uk) says it is recommended to enter the house with the right foot, and that there is no difference of opinion on this. It adds that opinions differ on leaving. The same page reports that the Maliki school, and most scholars, recommend starting with the right foot both when entering and when leaving the house, quoting Khalil’s Mukhtasar and al-Kharshi’s commentary on it.

Entering and leaving the mosque

Abu Usaid (may Allah be pleased with him) reported a two-part supplication in Sahih Muslim 713a. One part is for stepping into the mosque and one for stepping out.

إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيَقُلِ اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ . وَإِذَا خَرَجَ فَلْيَقُلِ اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ " . قَالَ مُسْلِمٌ سَمِعْتُ يَحْيَى بْنَ يَحْيَى يَقُولُ كَتَبْتُ هَذَا الْحَدِيثَ مِنْ كِتَابِ سُلَيْمَانَ بْنِ بِلاَلٍ . قَالَ بَلَغَنِي أَنَّ يَحْيَى الْحِمَّانِيَّ يَقُولُ وَأَبِي أُسَيْدٍ .

Abu Usaid reported that the Messenger of Allah (ﷺ) said:When any one of you enters the mosque, he should say:" O Allah! open for me the doors of Thy mercy" ; and when he steps out he should say: 'O Allah! I beg of Thee Thy Grace." (Imam Muslim said: I heard Yahya saying: I transcribed this hadith from the compilation of Sulaiman b. Bilal)

On entering, the believer asks Allah to open the doors of His mercy. On leaving, the person asks for His grace, which many translations render as “bounty” or “favour”. The reason usually given is that a person enters for prayer, which is a time for mercy, and leaves to seek lawful provision and other good in the world, which is a time for Allah’s grace. That explanation is the commentators’ reading; the hadith itself doesn’t state it.

A fatwa from Darul Ifta Deoband, a Hanafi body, advises stepping in with the right foot while saying the entering supplication, and stepping out with the left foot while saying the leaving supplication. It also mentions making the intention of itikaf (a stay in the mosque for worship) on entering.

Longer forms and what is not quoted here

A Hanafi answer on HadithAnswers via IslamQA relays Imam al-Nawawi’s advice in al-Adhkar. He recommends adding seeking refuge in Allah, praise of Allah and blessings on the Prophet ﷺ before the supplication, then saying “Bismillah” and entering with the right foot. On leaving, the same is said with the word “bounty” in place of “mercy”. The answer itself adds that narrations differ slightly in wording.

The IslamQA.info list of mosque etiquettes also notes that a person shouldn’t sit down before praying two rak’ahs to “greet the mosque”. That prayer is a separate act of worship from the supplication, and each can be done in turn.

The right side and the left

The preference for the right foot in the mosque, and the left foot on leaving, is taught in many fatwas. Scholars draw it from a general principle in Sahih al-Bukhari 168, together with reports outside the two Sahihs.

Aisha (may Allah be pleased with her) reported the principle as follows:

حَدَّثَنَا حَفْصُ بْنُ عُمَرَ، قَالَ حَدَّثَنَا شُعْبَةُ، قَالَ أَخْبَرَنِي أَشْعَثُ بْنُ سُلَيْمٍ، قَالَ سَمِعْتُ أَبِي، عَنْ مَسْرُوقٍ، عَنْ عَائِشَةَ، قَالَتْ كَانَ النَّبِيُّ صلى الله عليه وسلم يُعْجِبُهُ التَّيَمُّنُ فِي تَنَعُّلِهِ وَتَرَجُّلِهِ وَطُهُورِهِ وَفِي شَأْنِهِ كُلِّهِ‏.‏

Narrated `Aisha:The Prophet (ﷺ) used to like to start from the right side on wearing shoes, combing his hair and cleaning or washing himself and on doing anything else

The report is about starting with the right in wearing shoes, combing the hair and washing, and in other things. Sahih al-Bukhari places it in the chapter on starting from the right in wudu and ghusl. The sources reviewed here connect it to good, honoured acts such as entering the house or the mosque. For the toilet the order is reversed, as the IslamicPortal fatwa notes, putting the left foot first on entering and the right on leaving.

Before entering the toilet

Anas (may Allah be pleased with him) described what the Prophet ﷺ said whenever he went to relieve himself. The report is in Sahih al-Bukhari 142, and Sahih Muslim has it too.

اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنَ الْخُبُثِ وَالْخَبَائِثِ ". تَابَعَهُ ابْنُ عَرْعَرَةَ عَنْ شُعْبَةَ. وَقَالَ غُنْدَرٌ عَنْ شُعْبَةَ إِذَا أَتَى الْخَلاَءَ. وَقَالَ مُوسَى عَنْ حَمَّادٍ إِذَا دَخَلَ. وَقَالَ سَعِيدُ بْنُ زَيْدٍ حَدَّثَنَا عَبْدُ الْعَزِيزِ إِذَا أَرَادَ أَنْ يَدْخُلَ.

Narrated Anas:Whenever the Prophet (ﷺ) went to answer the call of nature, he used to say, "Allah-umma inni a`udhu bika minal khubuthi wal khaba'ith i.e. O Allah, I seek Refuge with You from all offensive and wicked things (evil deeds and evil spirits)

The phrase asks Allah for refuge from the male and female harmful unseen beings. The Encyclopedia of Translated Prophetic Hadiths explains that the Prophet ﷺ used these words when he wanted to enter the place where he would relieve himself, whether to urinate or to defecate.

It is said before going in. The IslamQA.info answer on remembering Allah in the bathroom describes the scholars’ view that a person says it as he is about to enter, and does not continue to mention Allah after he is inside.

The words said after leaving are a short request for forgiveness.

What the four schools say

An IslamWeb fatwa on toilet etiquette reports that all four schools agree it is liked to say “Bismillah” and to seek refuge from Satan on entering. It then lists differences of detail, set out below.

School What the fatwa reports
Hanafi Say “Bismillah” first, then seek refuge, when entering the toilet; for reciting the Quran the order is reversed
Shafi’i Same order as the Hanafi school; al-Nawawi is quoted as saying the dhikr applies in the open and in a building
Maliki The dhikr is said before reaching the place of impurity, whether or not it was built for relieving oneself
Hanbali Agrees that saying “Bismillah” and seeking refuge is liked; its detailed order is not covered in the sources used here

The same fatwa reports that al-Dusuqi, a Maliki scholar, mentioned a consensus that remembering Allah in the heart is not disliked in the toilet. The IslamQA.info answer likewise says that speaking Allah’s name aloud there is makruh (disliked), while remembering Him silently is not.

On carrying anything that bears Allah’s name, the sources differ. SeekersGuidance says the Hanafi, Shafi’i and Maliki schools dislike it when the item is uncovered, and that covering it removes the dislike. IslamOnline describes it as disapproved in the Hanafi and Shafi’i schools but forbidden in the Hanbali and Maliki schools, so the two pages differ on the Maliki position.

How often, and how to fit them into a day

Each is said once per entry, and a person who enters the mosque five times a day says it five times.

A person who is learning can begin with one threshold, such as the house door, and add the next once it comes without thinking.

These short phrases are spiritual remembrance. Details of the right foot or the left, and the wording when the text is a longer one, vary between the schools, so a reader with a specific question can ask a qualified local scholar.

Sources

Header image: illustration, AI-generated.