The dua for entering the masjid is Allahumma-ftah li abwaba rahmatik, “O Allah, open the doors of Your mercy for me.” On the way out you say Allahumma inni as’aluka min fadlik, “O Allah, I ask You for Your bounty.” The Prophet ﷺ taught both together in one hadith (Sahih Muslim 713).

Each line below can be played, so you can hear how it sounds before you teach it. You will also find the order things are done at the door, which foot goes first each way, a card and a PDF to print, and a section on taking a child to the masjid for the first time.
The dua for entering the masjid
Allahumma-ftah li abwaba rahmatik
O Allah, open the doors of Your mercy for me.
The Prophet ﷺ said: when one of you enters the masjid, let him say this, and when he leaves, let him say Allahumma inni as’aluka min fadlik. Sahih Muslim 713.
Tap the box to select the Arabic, then copy it.
اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ
What happens at the door, in order
| Step | What to do or say | Source |
|---|---|---|
| 1 | Step in with your right foot | Bukhari, chapter on starting with the right |
| 2 | Send peace on the Prophet ﷺ: Bismillah, was-salamu ‘ala Rasulillah | Abu Dawud 465 |
| 3 | Allahumma-ftah li abwaba rahmatik | Muslim 713 |
| 4 | If you like, add A’udhu billahil-‘azim… (below) | Abu Dawud 466 |
| 5 | Pray two rak’ahs before you sit down | Bukhari 444 |
Sending peace on the Prophet ﷺ
Bismillah, was-salamu ‘ala Rasulillah
In the name of Allah, and peace be upon the Messenger of Allah.
Abu Dawud reports the Prophet’s instruction to send peace on him before the dua for entering, and al-Albani graded it sahih (Sunan Abi Dawud 465). The exact words above are from Fatimah’s narration in Sunan Ibn Majah 771, which sunnah.com grades weak. That is why some books print them and others leave them out. The sending of peace is what is established. These words are one common way to say it.
Seeking refuge from Shaytan
A’udhu billahil-‘azim, wa bi-wajhihil-karim, wa sultanihil-qadim, minash-shaytanir-rajim
I seek refuge in Allah the Almighty, in His noble Face and His eternal authority, from Satan the outcast.
Abdullah ibn Amr reported that the Prophet ﷺ said this on entering the masjid, and that whoever says it, Shaytan says: he is protected from me for the rest of the day. Sunan Abi Dawud 466, graded sahih by al-Albani.
The dua for leaving the masjid
Allahumma inni as’aluka min fadlik
O Allah, I ask You for Your bounty.
The second half of the same hadith. Sahih Muslim 713.
اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ
Also said on the way out
Allahumma’simni minash-shaytanir-rajim
O Allah, protect me from Satan the outcast.
Abu Hurairah reported: when you leave, send peace on the Prophet ﷺ and say this. Sunan Ibn Majah 773, graded sahih by Darussalam.
Going in and coming out, side by side
| Going in | Coming out | |
|---|---|---|
| Foot | Right first | Left first |
| Say | Allahumma-ftah li abwaba rahmatik | Allahumma inni as’aluka min fadlik |
| You ask for | Mercy (rahmah) | Bounty (fadl) |
| Before it | Peace on the Prophet ﷺ | Peace on the Prophet ﷺ |
| After it | Two rak’ahs before sitting | Back to your day |
Why mercy going in and bounty going out? Scholars explain it by what each place is for. Inside, you are there to pray and remember Allah, and what you need for that is His mercy.
Outside is work, school, shopping and the rest of the day’s provision, and the Quran calls that provision Allah’s fadl: “when the prayer is over, disperse in the land and seek of the bounty of Allah” (62:10). Children find this easy to hold on to: mercy for the inside, bounty for the outside.
Which foot first?
The right foot going in and the left foot coming out. Al-Bukhari gave a chapter in his Sahih the title “starting with the right on entering the masjid and elsewhere”, and under it put Aisha’s report that the Prophet ﷺ liked to start with the right in everything he could (Sahih al-Bukhari 426). It is the reverse of the bathroom, where you go in with the left. A child who has learnt one can work out the other.
Read nextDua for Entering Home and Leaving Home: Arabic, Audio and MeaningA card for the door

Download the dua for entering and leaving the masjid as a one-page PDF. It has all five lines in order, with the meaning and source of each. Print it for your front door or the car, or for a masjid’s children’s corner.
Taking a child to the masjid for the first time
Say the dua together at the door. Stop on the step, hold hands and say Allahumma-ftah li abwaba rahmatik slowly while your child repeats each word. Then step over together, right foot first. Make it the moment you arrive, not something you remember once you are inside.
Choose a short prayer. Maghrib is three rak’ahs and the masjid is usually busy without being packed, so it suits a first visit. Jumu’ah is long and crowded for a small child.
Talk about shoes and quiet before you arrive. Shoes come off at the door and go on the rack. Voices drop once you are inside. Children cope far better when they know this before they walk in.
Show them the two rak’ahs. Pray your two rak’ahs on arrival with your child beside you, even if they only copy the movements. Our salah steps for kids page walks through each position. If they need wudu first, the wudu steps for kids and the dua after wudu cover it.
Girls are welcome too. The Prophet ﷺ said not to stop the female servants of Allah from going to the mosques of Allah (Sahih al-Bukhari 900). Most masjids have a women’s area, and a mother who takes her daughter gives her the same door and the same dua.
Teaching it to a child who cannot read Arabic yet
The entering dua is only five words, so it is one of the easiest to learn. Play the recording on your way to the masjid. At the door, say it with your child, and leave the last word for them: Allahumma-ftah li abwaba… and they finish with rahmatik. After a few visits they will say the whole thing without help.
Teach the leaving dua the same way once the first one comes easily. Many parents are learning these words at the same time as their children, and the recordings are here for that too. For your own front door, see the dua for entering home, and for the other duas of the day, our daily duas for kids.
Questions about the masjid duas
What do you say when entering the masjid?
Step in with your right foot, send peace on the Prophet ﷺ, then say Allahumma-ftah li abwaba rahmatik, “O Allah, open the doors of Your mercy for me” (Sahih Muslim 713).
What is the dua for leaving the masjid?
Allahumma inni as’aluka min fadlik, “O Allah, I ask You for Your bounty,” said as you step out with your left foot (Sahih Muslim 713).
Is there a different dua for Masjid al-Haram or Masjid an-Nabawi?
The same duas are said at every masjid, including the two Holy Mosques. Some books give a special dua on seeing the Ka’bah, but the words at the door stay the same.
Do I have to say it out loud?
No. A quiet voice is enough, and inside the masjid it is better not to disturb people who are praying. With a child, say it a little louder at the door so they can hear and copy you.
What if I forget the dua at the door?
Nothing is lost. Say it when you remember, and try again on your next visit. The two rak’ahs on arrival are a separate sunnah, and you can still pray them.
Nobody at home reads Arabic? Your child can still learn every word of this.
Our tutors teach children one to one and online, by ear first, then from the letters up to reading the Quran, and the duas of the day are part of the lessons. See Quran classes for kids, or message us and the first lesson is free.
Lessons in this subject: Online Islamic Studies




