Section III: Etiquettes of Relieving Oneself

Firstly: What is said upon entering
It is from the sunnah to say upon entering the place of relieving oneself: “Allah, I seek refuge from you from male and female devils.” [57] Ibn Hajar said: “This may refer to two scenarios: the first of which is if this dhikr is specific for places where one normally relieves oneself and are thence inhabited by devils, as is in the Hadith of Zayd ibn Arqam, or whether it additionally includes any time one wishes to relieve oneself, like in a vessel in the corner of his abode. The second opinion is most correct.” Fath al-Bari (244/1)

Secondly: What is said upon exiting
It is from the sunnah to say upon leaving the place of relieving oneself: “Allah, I ask for Your forgiveness!” [58] Ibn `Uthaymin said: “He says this after exiting, and if he is in the open, then upon leaving the place where he squatted.” Al-Sharh al-Mumti` (1/104-105)

Thirdly: Entering with the left foot and exiting with the right
It is mustahabb to enter khala' [59] Khala' literally means emptiness, but contextually refers to the place of relieving oneself. It may refer in today’s age to toilets. with the left foot and exit with the right, and this is by agreement of the four schools of jurisprudence.

Fourthly: Avoiding Allah’s mention in khala' mentioning Allah in khala'
It is makruh to mention Allah by the tongue when relieving oneself. This includes repeating after the call to prayer and supplicating for the one who sneezed. This is by agreement of the four schools of jurisprudence. Entering What Has the Mention of Allah in Khala'
It is makruh to enter what has the mention of Allah to khala' [60] Al-Shawkani said: “Qur’an has even more priority [not to be taken into khala'], to the point that some have said it is haram to take a mushaf (book wherein Qur’an is written) into khala' without need.” Nayl al-Awtar (74/1). Phones and other devices that have Qur’an applications installed are not a valid analogy and so do not take the same ruling. except due to a need, and this is by agreement of the four schools of jurisprudence.

Fifthly: Talking while relieving oneself
Talking while relieving oneself is makruh if without some benefit. [61] Al-Nawawi said: “Any scenario where there is need for talking is an exception for this, like if he saw a blind man about to fall into a well, or a snake or scorpion heading for a person, or other scenarios, then talking in these situations is not makruh, rather it is obligatory.” Sharh al-Nawawi `ala Muslim (65/4) This is by agreement of the four schools of jurisprudence, and a group of the Salaf held this view, as well as the majority of jurists.

Sixthly: Maintaining a distance if in the dessert
It is liked for one relieving himself in the desert or an arid expanse to further himself from others’ sight. [62] Unless he is able to cover up or hide somewhere, in which case covering up suffices from furthering himself. The majority have explicitly mentioned this: Malikis, Shafi`is, and Hanbalis.

Seventhly: Covering up from others’ sight
It is wajib for a person relieving himself to cover up from others sight such that they are unable to see his `awrah. Consensus has been quoted on the obligation of covering one’s `awrah: al-Jassas, Ibn `Abd al-Barr, Ibn Rushd the grandson and Ibn Rajab al-Hanbali.

Eighthly: Seeking out soft land for relieving oneself
It is mustahabb for one about to relieve himself to seek out a soft piece of land, [63] Rikhw, in Arabic and in this context, refers to some sort of land that will not cause the urine to spray, like sand or soil. Ibn `Uthaymin said: “It refers to the soft piece of land where urine is not feared to spray.” Al-Sharh al-Mumti`(110/1) and this is by agreement of the four schools of jurisprudence.

Ninthly: Facing the qiblah or away from it when relieving oneself
It is haram to face towards or turn one’s back to the qiblah when relieving oneself in open spaces, but is permissible in built spaces. This is the position of the majority: Malikis, Shafi`is, and Hanbalis.

Tenthly: Facing the wind when urinating
It is makruh to face the wind when urinating, and this is by agreement of the four schools of jurisprudence.

Eleventhly: Places where relieving oneself is prohibited the mosque
It is haram to relieve oneself in the mosque, and this is by agreement of the four schools of jurisprudence. 
Graves:
It is haram to relieve oneself on a grave, and this is by agreement of the four schools of jurisprudence. 
Places where people meet and benefit from:
It is haram to relieve oneself on a path, under beneficial shade, under fruiting trees, and other places where people meet and benefit in. This is an opinion among the Malikis, a narration from Ahmad, and chosen by al-Nawawi and Ibn `Uthaymin. 
In a hole or crack:
It is makruh to urinate in a crack or a hole [64] Sarab refers to a hole in the earth without an escape, also Wakr – an animal’s small den. Al-Nawawi said: “a hole is that which is circular, and it is what is referred to as juhr…and sarab is what is rectangular.” Al-Majmu` (86/2) and similar outlets, and this is by agreement of the four schools of jurisprudence. 
Bath:
It is makruh to urinate or defecate in a bath [65] Al-Baghawi said: “What is meant by mustahamm is the place of bathing and washing, and it is referred to as mustahamm from hamim, which is hot water used for washing.” Sharh al-sunnah (384/1) that has no outlet, and this is by agreement of the four schools of jurisprudence. [66] Malikis used the term ijtinab in this matter sometimes, meaning to avoid, and with tark on others, which is to leave; that is, leaving it is required.