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:645Abū Bakr b. Abū Shaybah And Muḥammad b. Yaḥyá > Abū Nuʿaym > Ibn Abū Ghaniyyah > Abū al-Khaṭṭāb al-Hajarī > Maḥdūj al-Dhuhlī > Jasrah > Um Salamah

"Umm Salamah told me: 'The Messenger of Allah entered the courtyard of this mosque and called out at the top of his voice: 'The mosque is not permissible for anyone who is sexually impure or any woman who is menstruating.''"  

ابن ماجة:٦٤٥حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ وَمُحَمَّدُ بْنُ يَحْيَى قَالاَ حَدَّثَنَا أَبُو نُعَيْمٍ حَدَّثَنَا ابْنُ أَبِي غَنِيَّةَ عَنْ أَبِي الْخَطَّابِ الْهَجَرِيِّ عَنْ مَحْدُوجٍ الذُّهْلِيِّ عَنْ جَسْرَةَ قَالَتْ أَخْبَرَتْنِي أُمُّ سَلَمَةَ قَالَتْ

دَخَلَ رَسُولُ اللَّهِ ﷺ صَرْحَةَ هَذَا الْمَسْجِدِ فَنَادَى بِأَعْلَى صَوْتِهِ إِنَّ الْمَسْجِدَ لاَ يَحِلُّ لِجُنُبٍ وَلاَ لِحَائِضٍ