There are two well-known duas connected to the home. Before leaving, the Prophet taught: 'Bismillah, tawakkaltu ala Allah, wa la hawla wa la quwwata illa billah' ('In the name of Allah, I place my trust in Allah, and there is no power or strength except with Allah') — a dua of protection promising that the person is guided, defended, and shielded from shaytan for that outing. When entering, one is taught to say Bismillah and to send greetings of salam upon those inside, even an empty house: 'Bismillahi walajna, wa bismillahi kharajna, wa ala Rabbina tawakkalna' ('In the name of Allah we enter, in the name of Allah we leave, and upon our Lord we rely') (Sunan Abi Dawud 5096). The wisdom behind mentioning Allah's name at entry is striking: the Prophet said that when a person mentions Allah upon entering their house and eating, shaytan says to his companions, 'There is no lodging and no dinner for you here' (Sahih Muslim 2018). These small, consistent phrases turn something as routine as walking through your own door into a moment of protection and gratitude.
Q&A · Dua & Dhikr
Is there a dua for entering and leaving the house?
References
Sunan Abi Dawud 5096Sahih Muslim 2018
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.