What are the methods of knocking on the doors? What are the procedures for asking permission to enter a place in islam?
“Allah’s Apostle said, “If anyone of you asks the permission to enter thrice, and the permission is not given, then he should return.” (Bukhari, Isti’dhan, 13)
In our daily life we enter various places. Of course this has to be within the frame of certain manners. In this context, the Holy Qur’an addresses us as follows:
“O you who believe! Enter not houses other than your own, until you have asked permission and saluted those in them: that is best for you, in order that you may heed (what is seemly).” (al-Nur 24; 27)
Asking permission to enter a house or a similar place is based on the principle of protecting privacy. Allah’s Messenger (pbuh) clearly stated this issue in the following tradition: “Verily! The order of taking permission to enter has been enjoined because of that sight, (that one should not look unlawfully at the state of others).” (Bukhari, Isti’dhan, 11)
According to the statement of the above tradition, violation of privacy can occur not only by entering a house without permission but also by unlawfully looking into it. Therefore, when one attempts to ask permission to enter a place, he should stay on the right or left side of the door in accordance with the customs of the Prophet (pbuh). (Abu Dawud, Adab, 127)
What is worse is to peek through the key holes or to look through the windows and to spy on the people inside. These are not behaviors befitting a true believer. For such an action is moral lowness and a psychological disorder from the point of the peeking person and a cause of discomfort and embarrassment from the point of the person who is being watched.
Sahl b. Sa’d (r.a.) reported that a person peeped through the hole of the door of Allah’s Messenger (pbuh), and at that time Allah’s Messenger (pbuh) had a comb in his hand. When Allah’s Messenger (pbuh) recognized him he said:
“If I were to know that you had been peeping through the door, I would have thrust this into your eyes,” and Allah’s Messenger (pbuh) said:
“Permission is needed as a protection against glance.” (Muslim, Adab, 40-41)
Allah’s Messenger (pbuh) stated how great a crime and a sin peeping is by saying that: “He who peeped into the house of people without their consent, it is permissible for them to put out his eyes.” (Muslim, Adab, 43) Here the permissibility of putting someone’s eyes out is just to explain how immoral and bad such an action is. 
Since houses in the age of happiness were one storey simple buildings built from palm branches, people could enter other people’s houses easily by asking permission saying, “al-salam alaikum! May I enter?” We also see that the Prophet (pbuh) scolded the companions who did not observe this manner.
It was narrated Kaladah ibn Hanbal:
“Safwan b. Umayyah sent him with some milk, a young gazelle and some small cucumbers to the Apostle of Allah (pbuh) when he was in the upper part of Mecca. I entered but I neither asked permission nor gave a salutation. The Prophet (pbuh) said:
“Go back and say: “Peace be upon you”!” (Abu Dawud, Adab, 127)
A man of Banu Amir recalled that he asked the Prophet (pbuh) for permission to enter the house when he was in the house, saying:
“May I enter?” The Prophet (pbuh) said to his servant:
“Go out to this man and teach him how to ask permission to enter the house, and say to him: “Say: Peace be upon you. May I enter?”
The man heard it and said:
“Peace be upon you! May I enter?” The Prophet (pbuh) permitted him and he entered. (Abu Dawud, Adab, 127)
Because today’s buildings and doors are built differently than the ones in the age of happiness, it might be more difficult to make one’s salutation heard by the owner of the house. In fact out of necessity today people use doorbells for asking permission instead of saluting at the door. However, one may also follow the custom of the Prophet (pbuh) if he/she salutes the owner of the house when he/she opens the door.
Moreover, one should repeat knocking the door three times at most and if he does not get an answer he should not insist. This is stated in a verse as follows:
“If you find no one in the house, enter not until permission is given to you: if you are asked to go back, go back: that makes for greater purity for yourselves: and Allah knows well all that you do.” (al-Nur 24; 28)
Allah’s Messenger (pbuh) said that: “If anyone of you asks the permission to enter thrice, and the permission is not given, then he should return.” (Bukhari, Isti’dhan, 13) However, if a person thinks that the owner of the house did not hear the knocking, he/she may knock the door more.
It is not appropriate to use obscure statements while asking permission like to answer the question of “who is it?” as “it’s me;” because it is not always possible to recognize people from their voices, even if it is an acquaintance. Whereas, a question such as “who are you?” or “who is it?” implies the questioner’s wish to know the person at his/her door. Responses like “it’s me” “a man,” “someone,” “a servant of Allah,” and “someone you know,” are not enough to meet that wish. The following narration clearly warns us in this context:
Jabir (r.a.) narrated:
“I came to the Prophet in order to consult him regarding my father’s debt. When I knocked on the door, he asked, “Who is it?” I replied, “me” He said,
“Me, me?” He repeated it as if he disliked it. (Bukhari, Isti’dhan, 17)
In other reports we see that the companions of the Prophet (pbuh) answered the Prophet’s question “who are you?” as “I am such and such” adding his name into his response. (Bukhari, Riqaq, 13) Therefore, we should use such expressions that show our identity clearly even if we are knocking at our own door.
From the above mentioned narrations and evaluations, we see that there are certain manners that every Muslim should follow especially when asking permission to enter a place. He/she should let the members of the household know about his/her identity and receive their kind reception. Acting contrary to these manners is not appropriate for a true believer.
Moreover, one should follow certain manners in entering the rooms in his/her home. For instance, the following verse states that servants and children cannot go into bedrooms at certain times of the day without asking permission first:
“O you who believe! Let those whom your right hands possess, and the (children) among you who have not come of age ask your permission (before they come to your presence), on three occasions: before morning prayer; the while you doff your clothes for the noonday heat; and after the late night prayer: these are your three times of undress: outsides those times it is not wrong for you or for them to move about attending to each other: thus does Allah make clear the Signs to you: for Allah is full of knowledge and wisdom.” (al-Nur 24; 58)
Like adults, children who are at the age of puberty should ask permission every time they want to go into the bedrooms. This is mentioned in the Qur’an as follows: “But when the children among you come of age, let them (also) ask for permission, as do those senior to them (in age) …” (al-Nur 24; 59)
The narration below is very illustrative in this matter. The Messenger of Allah (pbuh) was questioned by a man who said,
“O Messenger of Allah, shall I ask permission from my mother to enter?” He said,
The man said, “I live with her in the house.”
The Messenger of Allah (pbuh) said
“Ask her permission.” The man said,
“I am at his continuous service.” Allah’s Messenger (pbuh) said,
“Ask her permission. Do you want to see her naked?” He said, “No.” He said,
“Then ask her permission.” (Muwatta, Isti’dhan, 1)
In conclusion, even close relatives and family members should be careful while entering into their houses and especially when entering each other’s rooms. They should not neglect to get each other’s permission.
 Peeping at other people’s intimate states is an ugly behavior which nobody approves. Because nobody would like his/her home or privacy invaded. This tradition shows strong disapproval of the Messenger of Allah in this regard. In time peeping at other people’s secrets turns into a bad disease. Islam wants to prevent such bad habits either before its emergence or before it gets worse. This is why it prohibits even a little amount of something whose great amount is prohibited. Based on this principle, to drink a small amount of alcoholic beverages is banned even though it does not make a person drunk. Through such a fierce threat Islam wants to prevent such bad actions such as peeping into other people’s houses.
 Interpreters of this tradition also pointed out the following indicative meaning. Allah’s Messenger (pbuh) did not approve Jabir to say “me”; because the word “me” consists of egoism, pride, and seeing oneself superior to others. Jalal-al-Din Rumi explained this tradition as follows: “A certain man came and knocked at a friend’s door: his friend asked him, “Who are you, O trusty one?” He answered, “I.” The friend said, “Begone, it is not the time for you to come in: at a table like this there is no place for the raw.” Save the fire of absence and separation, who/what will cook the raw one? Who/what will deliver him from hypocrisy? The wretched man went away, and for a year in travel and in separation from his friend he was burned with sparks of fire. That burned one was cooked: then he returned and again paced to and fro beside the house of his comrade. He knocked at the door with a hundred fears and respects, lest any disrespectful word might escape from his lips. His friend called to him, “Who is at the door?” He answered, “It is You are at the door, O charmer of hearts.” “Now,” said the friend, “since you are I, come in, O myself: there is not room in the house for two I’s. The double end of thread is not for the needle: inasmuch as you are single, come into this needle.” (Mathnawi, I, verses: 3056-3064)