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.
bayhaqi:4275Yaḥyá b. ʿUmārah from And Jh Ākhar Mawṣūl > Muḥammad b. ʿAbdullāh al-Ḥāfiẓ > Abū Bakr b. Isḥāq > Abū al-Muthanná > Musaddad > Bishr b. al-Mufaḍḍal > ʿUmārah b. Ghaziyyah > Yaḥyá b. ʿUmārah al-Anṣārī > Abū Saʿīd al-Khudrī

[Machine] The Messenger of Allah ﷺ said: "The entire earth is a mosque, except for the bathroom and graveyard." Some scholars argued against praying in graveyards with a confirmed hadith narrated by Ibn Umar, where the Prophet ﷺ said: "Make your houses your places of prayer and do not make them graves." There are also two confirmed hadiths, one narrated by Aisha and the other by Ibn Abbas, where the Prophet ﷺ cursed the Jews and Christians for taking the graves of their prophets as places of worship, warning against doing the same. These two hadiths are mentioned in their appropriate places, and we have also narrated from Abdullah ibn Amr ibn al-As that he disliked men praying in bathrooms.  

البيهقي:٤٢٧٥وَقَدْ رُوِيَ عَنْ يَحْيَى بْنِ عُمَارَةَ مِنْ وَجْهٍ آخَرَ مَوْصُولًا أَنْبَأَهُ مُحَمَّدُ بْنُ عَبْدِ اللهِ الْحَافِظُ ثنا أَبُو بَكْرِ بْنُ إِسْحَاقَ أنبأ أَبُو الْمُثَنَّى ثنا مُسَدَّدٌ ثنا بِشْرُ بْنُ الْمُفَضَّلِ ثنا عُمَارَةُ بْنُ غَزِيَّةَ عَنْ يَحْيَى بْنِ عُمَارَةَ الْأَنْصَارِيِّ عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ قَالَ

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