When entering ones home :
اللَّهُمَّ إِنِّي أَسْأَلُكَ خَيْرَ الْمَوْلِجِ وَخَيْرَ الْمَخْرَجِ بِسْمِ اللَّهِ وَلِجْنَا وَعَلَى
اللَّهِ رَبِّنَا تَوَكَّلْنَا
"O Allah, I seek a good entry and a good exit. We take
Allah's name to enter and to exit and rely on Him who is
our Lord.
After this dua greet the members of the household.
(Mishkat)
Jaabir (R.A.) narrates that Prophet Mohammad (S.A.W.)
stated that when a man enters his home and makes Dhikr
(remembers Allah) and also makes Dhikr at meal times,
then Satan says to his colleagues that the night cannot be
spent there nor can they partake of the peoples food and if
no Dhikr was made on entering the house, then Satan says
to his colleagues that they have an opportunity to spend the
night there and if no Dhikr was made at meal times, then
Satan tells his colleagues that they will be able to stay there
and also get food.
(Mishkat, Chapter on food)
Prophet (SAW)'s Prayers
When leaving the house
Recite:
بِسْمِ اللَّهِ تَوَكَّلْتُ عَلَى اللَّهِ وَلَا حَوْلَ وَلَا قُوَّةَ إِلَّا بِاللَّهِ
"I depart with Allah's name, relying on Him. It is Allah who
saves us from sins with His guidance (the ability to do
so)." (Tirmidhi)
It is stated in the hadith that if a person recites the above
dua and departs then there is an (unseen) proclamation
that his need will be fulfilled and that he will be protected
from any harm or injury. On hearing this dua, the Satan
goes away from the place and refrains from troubling the
reciting person.
(Tirmidhi)
Also look towards the sky and recite:
اللَّهُمَّ إِنِّي أَعُوذُ بِكَ أَنْ أَضِلَّ أَوْ أُضَّلَّ أَوْ أَظْلِمَ أَوْ أُظْلَمَ أَوْ أَجْهَلَ أَوْ
يُجْهَلَ عَلَىَّ
"O Allah, I seek refuge in You from misleading or being
misled or oppressing or being oppressed or from being
ignorant or bearing the result of ignorance".
(Mishkat)