- Published on
Dua for Entering the Masjid: A Small Habit That Transforms Your Salah
- Authors

- Name
- Ahmad
- Role
- Senior Marketing Manager, Islamic education • Deen Back
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
In the name of God, the Most Gracious, the Most Merciful.

Most of us walk into the masjid the same way we walk into a grocery store — distracted, rushed, thinking about the thing we have to do next.
We check our phones. We find a spot. We stand in line. The iqamah goes, and we pray. But the mental shift — from dunya to worship — never actually happens. We were physically present but spiritually somewhere else entirely.
The Prophet (peace be upon him) knew this would happen. That is why he taught a dua specifically for the moment you step through the masjid door. It is not just a formality. It is a mental switch — a deliberate act that tells your nafs: we are entering Allah's house now. Pay attention.
The Dua for Entering the Masjid
When you are about to enter the mosque, step in with your right foot first and say:
اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ
Allahumma aftah li abwaba rahmatika.
"O Allah, open for me the doors of Your mercy." — (Sahih Muslim 713)
It is also Sunnah to send salawat upon the Prophet (peace be upon him) when entering:
اللَّهُمَّ صَلِّ عَلَى مُحَمَّدٍ وَسَلِّمْ
Allahumma salli 'ala Muhammad wa sallim.
"O Allah, send blessings and peace upon Muhammad."
And to seek refuge from Shaytan:
أَعُوذُ بِاللَّهِ الْعَظِيمِ وَبِوَجْهِهِ الْكَرِيمِ وَسُلْطَانِهِ الْقَدِيمِ مِنَ الشَّيْطَانِ الرَّجِيمِ
A'udhu billahil-'adheem wa bi wajhihil-kareem wa sultanihil-qadeem minash-shaytanir-rajeem.
"I seek refuge in Allah the Magnificent, in His noble Face, and in His eternal authority, from the accursed Shaytan." — (Abu Dawud 466)
When to say it: Every single time you enter a mosque — for the five daily prayers, Jumu'ah, Taraweeh, or any visit.
The Story Behind It
Abu Usayd (may Allah be pleased with him) reported that the Prophet (peace be upon him) said: "When one of you enters the mosque, let him say: Allahumma aftah li abwaba rahmatika, and when he leaves, let him say: Allahumma inni as'aluka min fadlika" (Sahih Muslim 713).
Notice the difference. Entering — you ask for mercy. Leaving — you ask for bounty (fadl). Inside the mosque, you need Allah's mercy to make your worship sincere and accepted. Outside, you need His bounty to navigate the world.
The Prophet (peace be upon him) was teaching his companions to be intentional about transitions. The door of the masjid is not just a physical boundary — it is a spiritual one. Crossing it with awareness changes the quality of everything that follows.
This is also why he taught entering with the right foot first. It is a physical action that triggers a mental shift. Your body does something deliberate, and your mind follows.
How to Make This Dua Part of Your Daily Life
If you pray at the masjid even once a day, you have a built-in opportunity to practice this dua daily. Here is how to turn it from something you know into something you actually do:
Put it on your phone lock screen. Screenshot the Arabic text and transliteration. For the first two weeks, glance at it before you walk in. By week three, you will not need it anymore.
Pair it with the right foot. The physical act of stepping with your right foot is your trigger. Every time your right foot crosses the threshold, the dua follows. Body and tongue move together — this is how habits form.
Slow down at the door. Do not walk in while scrolling your phone. Stop at the entrance for three seconds. Right foot. Dua. Enter. This micro-pause is where the transition happens.
Stack it with tahiyyat al-masjid. After the entrance dua, go straight to your two-rak'ah greeting of the mosque (Sahih al-Bukhari 1163). The sequence becomes: right foot → entrance dua → two rak'ahs → sit. One smooth chain of Sunnah actions.
Track it. Did you say the dua today or did you walk in on autopilot? Be honest with yourself. Building a streak of conscious masjid entries trains your mind to be present.
Build a Mindful Masjid Routine
Track your daily salah habits, set reminders for Sunnah practices, and build consistency with Deen Back — so every trip to the masjid becomes intentional.
Free download. Premium features available in-app.
Related Duas
Dua for leaving the masjid:
اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ
Allahumma inni as'aluka min fadlika.
"O Allah, I ask You from Your bounty." — (Sahih Muslim 713)
Dua for entering the home:
For a similar Sunnah practice at home, see our guide on dua for entering home.
Dua for protection when leaving the house:
بِسْمِ اللَّهِ تَوَكَّلْتُ عَلَى اللَّهِ وَلَا حَوْلَ وَلَا قُوَّةَ إِلَّا بِاللَّهِ
"In the name of Allah, I place my trust in Allah, and there is no power nor strength except with Allah." — (Abu Dawud 5095)
For more on building strong daily dua habits, see dua for protection and dua for waking up.
Common Questions
Is the entrance dua obligatory or Sunnah?
It is a Sunnah — not obligatory. Missing it does not invalidate your prayer or your visit to the masjid. But Sunnah acts are how you build a relationship with the Prophet's way of life. They are small investments that compound into taqwa over time.
What if I forget and already walked inside?
Say it wherever you are. The purpose is the mental shift, not the exact physical location. If you are already at your prayer spot and remember, say it there. The goal is training yourself to be consistent, and beating yourself up over a missed moment helps no one.
Does this apply to women praying at home?
If you have a dedicated prayer space at home, many scholars recommend saying a dua before entering it to create the same mental transition. The principle is the same: mark the shift from daily life to worship. Any act of intentionality before salah deepens your prayer.
What about children — should I teach them this dua?
Absolutely. Teaching children the entrance dua is one of the easiest Sunnah habits to instill. Make it a game: who remembers to say it first? Children who grow up with this habit enter the masjid differently for the rest of their lives.
Every Door Is an Opportunity
The masjid door is not just a door. It is a boundary between two worlds — the noise outside and the stillness inside. Every time you cross it with intention, you are training your heart to be present.
Eight Arabic words. Three seconds. That is all it takes to shift from autopilot to awareness.
Start today. Right foot first. Allahumma aftah li abwaba rahmatika. And watch how that one small habit begins to change the quality of every prayer that follows.
Make Every Prayer Count
Track your Sunnah habits, build daily dhikr streaks, and transform your salah routine with Deen Back — your companion for consistent spiritual growth.
Free download. Premium features available in-app.
Frequently Asked Questions
What is the dua for entering the masjid?
The dua for entering the mosque is: Allahumma aftah li abwaba rahmatika — O Allah, open for me the doors of Your mercy (Sahih Muslim 713). You should also send salawat upon the Prophet (peace be upon him) and enter with your right foot first. This is a Sunnah practice that helps you transition mentally into a state of worship.
Do I have to say the dua in Arabic?
While the Arabic dua carries the specific virtue mentioned in the hadith, scholars agree that making dua in your own language is permissible. However, this particular dua is short enough to memorize in Arabic — just eight words. Start by reading the transliteration and within a few days of practice, it will become natural.
Which foot do I enter the masjid with?
Enter the masjid with your right foot first. This is based on the general Sunnah of starting with the right side for honorable actions. When leaving, step out with your left foot first. Anas ibn Malik (may Allah be pleased with him) narrated that it is from the Sunnah to enter the mosque with the right foot (Sahih al-Bukhari, al-Adab al-Mufrad).
Should I pray tahiyyat al-masjid before sitting down?
Yes. The Prophet (peace be upon him) said: When one of you enters the mosque, let him not sit down until he has prayed two rak'ahs (Sahih al-Bukhari 1163). This is called tahiyyat al-masjid — the greeting of the mosque. It pairs naturally with the entrance dua as part of your masjid routine.
Can I say this dua when entering any prayer space, not just a formal mosque?
Yes. Scholars note that the dua applies to any place designated for prayer, including musallas (prayer rooms) in offices, airports, or homes with a dedicated prayer space. The purpose is to mentally transition into worship mode, and that applies wherever you pray.
