The Book of Etiquette of Traveling

Riyad as-Salihin · Chapter 178

Desirability of Entering the Mosque near one's Home upon returning from a Journey for offering two Rak'ah Prayer

باب استحباب ابتداء القادم بالمسجد الذي في جواره وصلاته فيه ركعتين

This short chapter is about a small but meaningful habit on returning from a journey: beginning with the mosque before going home. It frames homecoming as a moment to first reconnect with Allah.

The single narration shows the Prophet, upon returning, going straight to the mosque to pray two short units of prayer. The quiet lesson is to start the return to settled life with worship and gratitude to Allah.

Hadith 988

Ka'b bin Malik (May Allah be pleased with him) reported:

عن كعب بن مالك رضي الله عنه أن رسول الله صلى الله عليه وسلم كان إذا قدم من سفر بدأ بالمسجد فركع فيه ركعتين ‏.‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏ ‏.‏

Whenever the Messenger of Allah (ﷺ) returned from a journey, he would proceed straight to the mosque and perform two Rak'ah of (optional) prayer. [Al-Bukhari and Muslim].

In plain words

Whenever the Prophet came back from a journey, he would go first to the mosque and pray two units of prayer before anything else, beginning his return with worship.

Reference : Riyad as-Salihin 988 In-book reference : Book 7, Hadith 33