The Messenger of Allah ﷺ said, "When a man enters his home, let him say, 'O Allah, I ask You for the best of entrances and the best of exits. In the name of Allah we enter, and in the name of Allah we leave, and upon Allah, our Lord, we rely.' Then let him greet his family with peace."
حدثنا ابن عوف حدثنا محمد بن إسمعيل قال حدثني أبي قال ابن عوف ورأيت في أصل إسمعيل قال حدثني ضمضم عن شريح
قال رسول الله ﷺ إذا ولج الرجل بيته فليقل اللهم إني أسألك خير المولج وخير المخرج بسم الله ولجنا وبسم الله خرجنا وعلى الله ربنا توكلنا ثم ليسلم على أهله
No references are available.
[Its chain is daif] Tabarani narrated it in Musnad Shamiyin: 2/447, no. 1674, from the hadith of Muhammad bin Ismail bin Ayyash, and it is mursal. See no. 5083.