The Messenger of Allah ﷺ said, "Do not set out on a journey except to three mosques, this mosque of mine, the Sacred Mosque, and the Aqsa Mosque."
قال رسول الله ﷺ: لا تشدوا الرحال إلا إلى ثلاثة مساجد: مسجدي هذا، والمسجد الحرام، والمسجد الأقصى.
Bukhari narrated it in the Book on the Merit of Prayer (1197), and Muslim in the Book on Hajj (415/827 and 416), both from the hadith of Shubah, from Abdul-Malik bin Umayr, from Qazaa, from Abu Saeed, and he related the hadith. The wording given here is Muslim's.In Bukhari, Qazaa, the freedman of Ziyad, said, I heard Abu Saeed Khudri relating four things from the Prophet ﷺ, and they pleased and delighted me. He said, "A woman must not travel for two days unless her husband or a mahram is with her. There is no fasting on two days, the day of Fitr and the day of Adha. There is no prayer after two prayers, after the dawn prayer until the sun rises, and after Asr until it sets. And one should not set out specifically for any masjid except three, the Sacred Masjid, Aqsa, and my masjid."All of these will be discussed in their respective places.As for his word "delighted me" (aanaqatni), it is spelled with a long vowel, then a fatha-marked nun, then a silent qaf, followed by two nuns. It is said "aanaqahu" when something pleases him, and a thing described as "muniq" means something pleasing.