A mosque (Masjid) is a sacred place, meant for the performance of prayer (Salah). It is a place where Muslims gather five times a day to perform one of the most important acts of worship, collectively, under the leadership of an Imam". Hence, it holds a significant status in Islam.
Islam teaches us to relate every action and task with the remembrance of Allah سُبْحَانَهُۥ وَتَعَالَىٰ. Doing so converts all such actions and tasks into worship. Likewise, the Islamic teachings also prescribe a specific Dua to recite when you enter a mosque.
When a Muslim enters a mosque, it is best to recite the dua upon entering the mosque. Man is inherently weak and dependent on the blessings of Allah (سُبْحَانَهُ وَتَعَالَى). Reciting the dua given below is an effective and easy way of gaining the mercy of Allah (سُبْحَانَهُ وَتَعَالَى) and thereby helping oneself to stay on the true path.
The dua to be recited upon entering the mosque is a sunnah and has been verified by multiple hadiths. A hadith by Sahih Muslim (713 a) states that the person who recites the dua for entering the mosque regularly their sins will be forgiven, and they will be the recipient of the everlasting and limitless mercy of Allah (سُبْحَانَهُ وَتَعَالَى). The same has been reported in (Sunan Ibn Majah 771), Abu Humaid As-Sa'idi (رَضِيَ ٱللَّٰهُ عَنْهُ) in (Sunan Ibn Majah 772) and by Abu Hurairah (رَضِيَ ٱللَّٰهُ عَنْهُ) in (Sunan Ibn Majah 773).
The dua upon entering the mosque wipes away the sins of the reciter and is an excellent way of asking Allah (سُبْحَانَهُ وَتَعَالَى) for his mercy (Sunan an-Nasa'i 729). The gates of mercy are opened for the person who recites the dua upon entering the mosque (Sunan Abi Dawud 465).
Prayer Duas
'A'oothu billaahil-'Adheem, wa bi-Wajhihil-Kareem, wa Sultaanihil-qadeem, minash-Shaytaanir-rajeem. Bismillaahi, wassalaatu. Wassalaamu 'alaaRasoolillaahi. Allaahum-maftah lee 'abwaaba rahmatika.
I seek refuge in Almighty Allah, by His Noble Face, by His primordial power, from Satan the outcast. In the Name of Allah, and blessings and peace be upon the Messenger of Allah. O Allah, open before me the doors of Your mercy.
للَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ
Transliteration - Allahumma iftah li abwaba rahmatika
Translation - O Allah! open for me the doors of Thy mercy
The following is the most authentic Dua for entering Masjid, as recommended by the majority of the scholars and is also mentioned in Hadith 713a of Sahih Muslim.
اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ - O Allah! open for me the doors of Thy mercy
Upon entering the mosque, the dua should be recited while placing one's right foot inside the mosque first. Islamic customs demand that a person must start a good deed by their right hand or foot. The same is verified by the sunnah of the Prophet Muhammad( ﷺ ) and his companions. Secondly, the dua should be recited with utmost sincerity with full hope of receiving the blessings and mercy of Allah (سُبْحَانَهُ وَتَعَالَى) and one's sins being forgiven.
Accordingly, the manners (etiquettes) of reciting Dua when entering the Mosque (Masjid) are summarized as follows:
When entering the Mosque, make sure:
Reciting the dua upon entering the mosque is a simple act, yet carries a great reward – Allah has promised to erase the sins of the person who recites this dua. In addition, the person becomes entitled to the mercy of Allah (سُبْحَانَهُ وَتَعَالَى), and the gates of mercy are opened for him. The dua is also a great way of increasing one's good deeds and, at the same time, reminding oneself of the love of Allah (سُبْحَانَهُ وَتَعَالَى) for His creation.
Technically, there is no harm in offering a Dua in your own language. However, the best and strongly recommended practice is to recite the Dua upon entering the Mosque in Arabic. It is a short Dua. Try to memorize it and make a habit of reciting it when entering the Mosque.
Since it is not an obligatory act to recite this Dua on entering the Mosque, there is no sin if you forgot to recite it. However, you need to make it a habit to recite this Dua invariably on entering the Mosque, as it is a highly emphasized Sunnah practice.
The best and strongly recommended practice is to recite this Dua silently. However, if one recites it in a loud voice, there is no sin, but it may be a disgraceful act, considering the sanctity and respect of the Mosque. That's why you should avoid reciting it loudly.