Sunan Abi Dawud 9
Grading supplied with this record: Sahih (Al-Albani)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
إِذَا أَتَيْتُمُ الْغَائِطَ فَلاَ تَسْتَقْبِلُوا الْقِبْلَةَ بِغَائِطٍ وَلاَ بَوْلٍ وَلَكِنْ شَرِّقُوا أَوْ غَرِّبُوا "
Narrated Abu Ayyub :
That he (the Holy Prophet, sal Allahu alayhi wa sallam) said:"When you go to the privy, neither turn your face nor your back towards the qiblah at the time of excretion or urination, but turn towards the east or the west. (Abu Ayyub said): When we came to Syria, we found that the toilets already built there were facing the qiblah, We turned our faces away from them and begged pardon of Allaah.
Full reference and source
Sunan Abi Dawud 9 In-book : Book 1, Hadith 9 English translation : Book 1, Hadith 9
View source on Sunnah.com (opens in a new tab)