Is Taking a Home Loan Haram?
Question

I am an employee… My problem has to do with our family’s house. This house belonged to my grandfather (may Allah have mercy on him), and after his death it came into the possession of his eight children, five males and three females, and my grandmother. I am the son of the oldest son who paid fifty-percent of the costs of building the house, and I expanded it. … One paternal uncle lives in the house, and he is married with two sons. My family and paternal uncles and aunts all have their own houses and do not need this house.
My question is: I want to buy this house with a loan from the bank, from my uncles and aunts because I need it. Is this permissible according to Shari‘ah?
Praise be to Allah.Types of loans from banks
Loans from banks are of two types: 

A “goodly loan” (qard hasan) which does not involve any additional payment (interest); there is nothing wrong with this;
A loan with interest, which is riba , and there is scholarly consensus that it is haram. It is not permissible except in cases of urgent necessity which cannot be met except by taking out a riba-based loan . The need for housing does not reach a level which makes it permissible to deal with riba, because this need can be met by renting. So it is not permissible to take out a riba-based loan in order to buy a house.

Ibn Qudamah (may Allah have mercy on him) said:
“Every loan in which it is stipulated that something extra must be paid back is haram, with no difference of scholarly opinion. Ibn al-Mundhir said: [the scholars] unanimously agreed that if the lender stipulates that the borrower must pay extra or give him a gift, and he lends him money on that basis, then accepting the extra payment is riba. It was narrated from Ubayy ibn Ka’b, Ibn 'Abbas and Ibn Mas’ud that they forbade every loan that brings benefits, because loans should be given as an act of kindness and an act of worship aimed at bringing one closer to Allah. So if there is a stipulation of extra payment, this diverts the loan from its purpose.” (Al-Mughni, 6/436)
This applies if the aim is to take out a loan from the bank that clearly involves interest. 
Taking home loan
If the aim is to buy a house through the bank, this also is of two types: 

The role of the bank is to finance the purchase in return for interest, so it pays the price of the house for you, on condition that you will pay it off in installments in return for interest that will be taken from the bank. This is a riba-based loan and is haram.
The bank buys the house for itself first, then sells it to you for a higher price, in installments. There is nothing wrong with this, but it is essential that the contract be free of any stipulation of riba , which is the condition that a penalty be paid in the event of any delay in paying the installments, because stipulating this penalty is riba and is haram.

Prohibition of riba in Islam
It is no secret to you that riba is a major sin , and there are stern warnings concerning it that are not given for other sins; Allah threatens war to the one who commits this sin and He told His Prophet (blessings and peace of Allah be upon him) that there is a curse upon the one who consumes riba and the one who pays it. This is a strong warning against falling into this evil. 
“O you who believe! Fear Allah and give up what remains (due to you) from Riba (from now onward) if you are (really) believers. And if you do not do it, then take a notice of war from Allah and His Messenger but if you repent, you shall have your capital sums. Deal not unjustly (by asking more than your capital sums), and you shall not be dealt with unjustly (by receiving less than your capital sums)” [Al-Baqarah 2:278-279]
Muslim narrated (1598) that Jabir (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) cursed the one who consumes riba and the one who pays it, the one who writes it down and the two who witness it, and he said: they are all the same. 
And the Prophet (blessings and peace of Allah be upon him) said: “A dirham of riba that a man consumes knowingly is worse before Allah than thirty-six acts of zina (adultery). (Narrated by Ahmad and al-Tabarani; classed as authentic by al-Albani in Sahih al-Jami‘, no. 3375)
And Allah knows best.