The Messenger of Allah ﷺ forbade praying in seven places, the rubbish dump, the slaughterhouse, the graveyard, the middle of the road, the bathhouse, the resting places of camels, and on top of the House of Allah.
حدثنا محمود بن غيلان حدثنا المقرئ حدثنا يحيى بن أيوب عن زيد بن جبيرة عن داود بن الحصين عن نافع
أن رسول الله ﷺ نهى أن يصلى في سبعة مواطن في المزبلة والمجزرة والمقبرة وقارعة الطريق وفي الحمام وفي معاطن الإبل وفوق ظهر بيت الله
[Hasan] Ibn Majah also recorded it in "The Mosques and Congregations," chapter "The Places Where Prayer Is Disliked," no. 746, from the hadith of Abu Abdul-Rahman Muqri with the same wording, but its chain is extremely daif. Zayd is discarded (matruk), and he narrated from Dawud bin Husayn a hadith that is extremely munkar. However, his hadith has a strong corroborating witness in Ibn Majah, no. 747.