O you who have believed, do not enter houses other than your own houses until you ascertain welcome and greet* their inhabitants. That is best for you; perhaps you will be reminded.
And if you do not find anyone therein, do not enter them until permission has been given you. And if it is said to you, “Go back,” then go back; it is purer for you. And Allah is Knowing of what you do.
There is no blame upon you for entering houses not inhabited in which there is convenience for you. And Allah knows what you reveal and what you conceal.
Chapter 24 An-Nūr : Verses 27-29
Seeking Permission and the Etiquette of entering Houses
This is the Islamic etiquette. Allah taught these manners (of seeking permission) to His believing servants and commanded them not to enter houses other than their own until they had asked permission, i.e., to ask for permission before entering and to give the greeting of Salam after asking. One should seek permission three times, and if permission is given, (he may enter), otherwise he should go away.It was reported in the Sahih that when Abu Musa asked `Umar three times for permission to enter and he did not give him permission, he went away. Then `Umar said, “Did I not hear the voice of `Abdullah bin Qays asking for permission to enter Let him come in.” So they looked for him, but found that he had gone. When he came later on, `Umar said, “Why did you go away” He said, “I asked for permission to enter three times, but permission was not given to me.
Messenger of Allah asked for permission to enter upon Sa`d bin `Ubadah. He said: (As-Salamu `Alayka wa Rahmatullah) Sa`d said, “Wa `Alaykas-Salam Wa Rahmatullah,” but the Prophet did not hear the returned greeting until he had given the greeting three times and Sa`d had returned the greeting three times, but he did not let him hear him ﴿i.e., Sa`d responded in a low voice﴾. So the Prophet went back, and Sa`d followed him and said,”O Messenger of Allah, may my father and mother be ransomed for you! You did not give any greeting but I responded to you, but I did not let you hear me. I wanted to get more of your Salams and blessings.” Then he admitted him to his house and offered him some raisins.
It should also be known that the one who is seeking permission to enter should not stand directly in front of the door; he should have the door on his right or left, because of the Hadith recorded by Abu Dawud from `Abdullah bin Busr, who said, “When the Messenger of Allah came to someone’s door, he would never stand directly in front of it, but to the right or left, and he would say, (As-Salamu `Alaykum, As-Salamu `Alaykum.) That was because at that time the houses had no covers or curtains over their doorways. In the Two Sahihs, it is recorded that the Messenger of Allah said: (If a person looks into your house without your permission, and you throw a stone at him and it puts his eye out, there will be no blame on you.)
As for seeking permission, the people have forgotten all about it.” I said, “Should I seek permission to enter upon my orphan sisters who are living with me in one house” He said, “Yes.” I asked him to make allowances for me but he refused and said, “Do you want to see them naked” I said, “No.” He said, “Then ask for permission to enter.” I asked him again and he said, “Do you want to obey Allah” I said, “Yes.” He said, “Then ask for permission.” `Does a man have to seek permission to enter upon his wife’ He said, `No, it can be understood that this is not obligatory, but it is better for him to let her know that he is coming in so as not to startle her, because she may be in a state where she does not want him to see her. ”’ Abu Ja`far bin Jarir narrated from the nephew of Zaynab — the wife of `Abdullah bin Mas`ud — that Zaynab, may Allah be pleased with her, said, “When `Abdullah came back from some errand and reached the door, he would clear his throat and spit, because he did not want to come suddenly and find us in a state he disliked.” Its chain of narration is Sahih.
(And if you find no one therein, still enter not until permission has been given.) This has to do with the way in which one deals with other people’s property without their permission. If he wants to, he can give permission, and if he wants to he can refrain from giving permission.
(And if you are asked to go back, go back, for it is purer for you.) means, if you are turned away at the door, before or after permission has been given, (And Allah is All-Knower of what you do.)
(There is no sin on you that you enter houses uninhabited,) This Ayah is more specific than the one that comes before it, because it states that it is permissible to enter houses where there is nobody, if one has a reason for doing so, such as houses that are prepared for guests — if he has been given permission once, then this is sufficient.
Allah said: (There is no sin on you that you enter houses uninhabited, (when) you have any interest in them.) This was also narrated from `Ikrimah and Al-Hasan Al-Basri.