Abu Ayub reported,

The Prophet ﷺ said, "Do not face the qiblah nor turn your back to it when relieving yourselves, whether for defecation or urination. Rather, face east or west."

Nasai 21

Sahih

أخبرنا محمد بن منصور قال حدثنا سفيان عن الزهري عن عطاء بن يزيد

عن أبي أيوب

أن النبي ﷺ قال لا تستقبلوا القبلة ولا تستدبروها لغائط أو بول ولكن شرقوا أو غربوا

النسائي 21صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Purification
Chapter
Prohibition of facing away from the qibla when relieving oneself
Numbering
Darussalam 21
Nasai 21