It is narrated from Sayyiduna Abu Ayyub Ansari (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When any person goes to relieve himself, he should not face the Qiblah; he should turn his face towards the east or the west." He says: When we came to Syria, we saw that the toilets were built facing the Qiblah, so we would turn away and seek forgiveness from Allah Almighty.
Hadith Referenceالفتح الربانی / كتاب الطهارة / 509
Hadith Gradingمحدثین:صحیح
Hadith Takhrij«أخرجه البخاري: 144، (انظر مسند أحمد ترقيم الرسالة: 23524 ترقیم بيت الأفكار الدولية: 23921»
Brief Explanation
Benefits: … Turning one’s face towards the east or west—this command of the Prophet sallallahu alayhi wa sallam pertains to those people who reside to the north and south of the qiblah. The addressees of this command of the Prophet sallallahu alayhi wa sallam were the people of Madinah, and Madinah Munawwarah is situated to the north of Makkah Mukarramah. For those who reside to the east and west of the qiblah, the ruling is that they should not face towards the east or west, so that neither their face nor their back is towards the Ka‘bah.