Is it true that we are supposed to say Assalaamu Alaykum at the time of entering our house and Khudahafeez at the time of leaving it even if there is no one in the house at the time of entry or exit? Please quote a related Hadeeth.
All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Some scholars mentioned that it is desirable for a Muslim when he enters a house (or any place) to say Salaam even if there is no one in it. It is desirable for him to say: 'May peace be upon us and upon the pious and righteous slaves of Allaah.' Ibn Hajar, may Allaah have mercy on him, said: 'Saying Salaam on one’s own self when entering a place where there is no one in it, is included in the general meaning of spreading Salaam as Allaah Says (what means): {But when you enter houses, give greetings of peace upon each other.}[Quran 24:61]'.
Al-Bukhari reported that Ibn ‘Umar said: “If one enters a house that is not inhabited, he should say: “May Salaam be upon us and upon the pious and righteous slaves of Allaah." This narration is also reported by Ibn Abu Shaybah, Mujaahid and ‘Ikrimah .
As regards saying “Khudahafeez” and the like when going out of the house, then this is something upon which there is no evidence. However, if one does so sometimes without considering it a Sunnah, then there is no harm in it, Inshaa’ Allaah.
Allaah Knows best.
You can search for fatwa through many choices