Can Toilets Face the Qiblah?
Question

I am currently building a house and I have been told that the toilets must be placed in such a manner that they do not face towards the Qiblah. Is that correct even if there is a wall in front of them?
Praise be to Allah.It is narrated in an authentic report that the Prophet (peace and blessings of Allah be upon him) forbade facing towards the Qiblah or turning one’s back towards it when relieving oneself. 
The majority of scholars (including Malik, Ash-Shafi`i, and Ahmad, may Allah have mercy on them) are of the view that this prohibition applies to one who is relieving himself in a place where there is no screen between him and the Qiblah, but inside buildings they say it is permissible to face the Qiblah or turn one’s back to it when relieving oneself. 
Others (including Abu Hanifah, and Shaykh Al-Islam Ibn Taymiyah, may Allah have mercy on them) are of the view that it is haram to face the Qiblah or turn one’s back towards it when relieving oneself in all cases, whether out in the open or inside a building. (See Al-Mughni, 1/107; Hashiyat Ibn `Abidin, 1/445; Al-Mawsu`ah Al-Fiqhiyyah, 43/5 )
So long as you are still at the building stage, it will be more on the safe side if you build the toilets so that when relieving oneself one is not facing the Qiblah or turning one’s back towards it, so as to avoid a matter concerning which the scholars differed. 
The Standing Committee for Issuing Fatwas was asked about the ruling on facing towards the Qiblah or turning one’s back towards it when relieving oneself, inside buildings or out in the open, then about the ruling on buildings that are currently being used in which there are toilets that face towards the Qiblah or have the Qiblah behind them, and they cannot be changed except by destroying the bathroom completely or partially in order to make the changes. If we have the plans and the house has not yet been built, and some of the toilets face towards the Qiblah or have the Qiblah behind them, is it obligatory to change them or does it not matter?  
They replied: 
“Firstly: 
The correct scholarly view is that it is prohibited to face towards the Qiblah (the Kabah) or turn one's back towards it when relieving oneself out in the open, either urinating or defecating, but that is permissible inside buildings or where there is a screen between oneself and the Ka’bah, close in front if one is facing towards the Qiblah and close behind if one has one's back to it, such as a saddle, a tree, a mountain and so on. This is the view of most of the scholars, because it is narrated from Abu Hurayrah (may Allah be pleased with him) that the Prophet (peace and blessings of Allah be upon him) said: “When one of you sits to relieve himself, let him not face towards the Qiblah or turn his back towards it.” (Narrated by Ahmad and Muslim. Also, Abu Ayyub Al-Ansari narrated that the Prophet (peace and blessings of Allah be upon him) said: “When you go to defecate, do not face towards the Qiblah or turn your back towards it, rather face towards the east or the west.” (Narrated by Al-Bukhari and Muslim)  
And it was narrated that Ibn `Umar (may Allah be pleased with him) said: One day I climbed up on the roof of the house of Hafsah and the Prophet (peace and blessings of Allah be upon him) was relieving himself, facing towards Syria, with his back towards the Ka`bah. (Narrated by Al-Bukhari, Muslim and the authors of As-Sunan) 
Abu Dawud and Al-Hakim narrated that Marwan Al-Asfar said: I saw Ibn `Umar (may Allah be pleased with him) making his camel kneel facing towards the Qiblah and urinating in that direction. I said, “O Abu `Abd Ar-Rahman, is that not forbidden? He said, “It is only forbidden to do that out in the open, but if there is something between you and the Qiblah that conceals you, there is nothing wrong with it.” Abu Dawud did not say anything about it, but Ibn Hajar said in Al-Fat-h: “Its chain of narrators is good.” 
Ahmad, Abu Dawud, At-Tirmidhi and Ibn Majah narrated that Jabir ibn `Abdullah (may Allah be pleased with him) said: The Prophet (peace and blessings of Allah be upon him) forbade us to face towards the Qiblah when urinating, then I saw him one year before he died, facing towards it.”  
This was also the view of a number of scholars who sought to reconcile the evidence by interpreting the hadeeth of Abu Hurayrah and similar reports as referring to cases of relieving oneself out in the open without any screen, and the Hadith of Jabir ibn `Abdullah and Ibn `Umar (may Allah be pleased with them) as referring to cases when one is inside a building or there is a screen between oneself and the Qiblah. 
From this it is known that it is permissible to face towards the Qiblah or turn one’s back to it when relieving oneself in any kind of building. 
Secondly:  
If the plans for the building have not yet been put into effect, and the toilets in the plan are facing towards the Qiblah or have their backs towards it, then it is more on the safe side to alter them so that when relieving oneself one is not facing towards the Qiblah or turning one’s back towards it, so as to avoid an area of scholarly dispute. But if they cannot be altered there is no sin involved because of the ahadith quoted above.” (Fatawa Al-Lajnah Ad-Da’imah, 5/97 )
For more details, please refer to the following answers: 14506 , 2532 , 9286 , 9790 , 20620 , and 21895 . 
And Allah knows best.