Assalamualaikum ustaz. What is the ruling of covering one’s head when urinating or defecating? Thank you.
Waalaikumussalam wrt. wbt.,
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions, and all those who follow his footsteps until the Final day.
We start with the statement of Allah SWT:
وَالسَّابِقُونَ الْأَوَّلُونَ مِنَ الْمُهَاجِرِينَ وَالْأَنصَارِ وَالَّذِينَ اتَّبَعُوهُم بِإِحْسَانٍ رَّضِيَ اللَّهُ عَنْهُمْ وَرَضُوا عَنْهُ وَأَعَدَّ لَهُمْ جَنَّاتٍ تَجْرِي تَحْتَهَا الْأَنْهَارُ خَالِدِينَ فِيهَا أَبَدًا ۚ ذَٰلِكَ الْفَوْزُ الْعَظِيمُ
“And the first forerunners [in the faith] among the Muhajireen and the Ansar and those who followed them with good conduct – Allah is pleased with them and they are pleased with Him, and He has prepared for them gardens beneath which rivers flow, wherein they will abide forever. That is the great attainment.” 
The phrase “وَالَّذِينَ اتَّبَعُوهُم بِإِحْسَانٍ” means those who follow the first people who embrace Islam from among the Muhajirin and Ansar. They are the generation of the companions and the following generations until the Last Day, if they follow then whether in their actions or speech. 
Covering one’s head when urinating or defecating
Regarding this matter, some jurists consider the act of covering the head when urinating or defecating is included under good manners and encouraged. Al-Nawawi cited from Imam al-Haramain, al-Ghazali, al-Baghawi and others, they are of the opinion that it is sunnah to not enter the restroom with an exposed head – which means not covered. 
Moreover, al-Mardawi also stated that it is sunnah to cover one’s head when urinating or defecating and this is stated by the majority of the ashab – among the scholars of madhhab Hanbali. 
This follows a hadith narrated by Aisyah R.Anha, she said:
كَانَ النَّبِي صلى الله عليه وسلم إِذَا دَخَلَ الْخَلاَءَ غَطَّى رَأْسَه
“When the Prophet PBUH entered the lavatory, he’ll cover his head.” 
Moreover, there in another hadith narrated from Habib bin Soleh, he said:
كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم إِذَا دَخَلَ الْخَلاَءَ لَبِسَ حِذَاءَهُ وَغَطَّى رَأْسَهُ
“The Messenger PBUH when he enters the lavatory, he’ll wear his sandals and covers his head.” 
However, both hadiths are criticized by scholars regarding their authenticity. Although, there is an athar that narrates this matter practised by the salaf. This is as stated in a narration from ‘Urwah, from his father that Abu Bakr – when delivering a sermon to the public – said:
يَا مَعْشَرَ الْمُسْلِمِينَ، اسْتَحْيُوا مِنَ اللهِ، فَوَالَّذِي نَفْسِي بِيَدِهِ إنِّي لأظل حِين أَذْهَبُ إلَى الْغَائِطِ فِي الْفَضَاءِ، مُغَطّيًا رَأْسِي اسْتِحْيَاءً مِنْ رَبِّي.
“O Muslims, you should be shy in front of Allah. By God of Whom my soul is in His hands, when I went to answer the call of nature in the desert, I’ll cover my head for I’m shy in front of my Lord.” 
Al-Baihaqi also stated in his sunan:
رُوِىَ فِى تَغْطِيَةِ الرَّأْسِ عِنْدَ دُخُولِ الْخَلاَءِ عَنْ أَبِى بَكْرٍ الصِّدِّيقِ، وَهُوَ عَنْهُ صَحِيحٌ
“It is narrated that the act of covering one’s head when entering the lavatory is from Abu Bakar al-Siddiq and this matter is sahih from him.” 
Likewise, Ibn Abi Syaibah stated that Ibn ‘Uyaynah narrated to us, from Ibn Tawus, he said:
أَمَرَنِي أَبِي إذَا دَخَلْتُ الْخَلاَءَ أَنْ أُقَنِّعَ رَأْسِي ، قُلْتُ : لِمَ أَمَرَك بِذَلِكَ ؟ قَالَ : لاَ أَدْرِي.
“My father instructed me to cover my head when entering the lavatory. I asked: “why did you ask me to do so?” He answered: ‘I don’t know.’” 
Thus, it is clear that the act of covering one’s head when urinating or defecating is the practice of Abu Bakar and previous scholars.
The commandment of following the footsteps of Khulafa’ al-Rasyidin
Generally, Khulafa’ al-Rasyidin which consists of four great leaders after the death of Rasullullah PBUH are Abu Bakar al-Siddiq, Umar bin al-Khattab, Uthman bin ‘Affan, and Ali bin Abu Talib R.Anhum. We are commanded to follow their footsteps – their sunnah – of the Khulafa’ al-Rasyidin.
Furthermore, we should know that the sunnah of Khulafa’ al-Rasyidin is in line with the sunnah of Prophet PBUH. This is shown by the Prophet PBUH according to a narration from Huzaifah bin al-Yaman RA, where the Prophet PBUH said:
اقْتَدُوا بِاللَّذَيْنِ مِنْ بَعْدِي أَبِي بَكْرٍ وَعُمَرَ
“Take as examples the two after me from my Companions, Abu Bakr and ‘Umar.” 
The same is stated in a narration by ‘Irbadh bin Sariyah RA, where the Messenger PBUH said:
فَعَلَيْكُمْ بِسُنَّتِي وَسُنَّةِ الْخُلَفَاءِ الرَّاشِدِينَ الْمَهْدِيِّينَ عَضُّوا عَلَيْهَا
“So, you must keep to my Sunnah and to the Sunnah of the Khulafa ar-Rashideen (the rightly guided caliphs), those who guide to the right way. Cling to it stubbornly.” 
According to the above discussion, in our opinion that covering the head when urinating or defecating or when entering the lavatory is mustahab (sunnah) according to the sahih athar from Abu Bakar al-Siddiq.
Likewise, this act is included in good manners that is practised by some salaf (previous) scholars.
May Allah SWT grant us all a clear understanding in religion. Amin.