Bulugh al-Maram, Book 5, Hadith 727 (English)

Abu Sa 'id AI-Khudri (RAA) narrated that The Messenger of Allah said: “One should not undertake journeys except to three mosques: al-Masque al-Haram (in Makkah ), the Aqsa mosque, or this mosque (in Madinah)." Agreed upon.

وَعَنْ أَبِي سَعِيدٍ اَلْخُدْرِيِّ ‏- رضى الله عنه ‏- قَالَ: قَالَ رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-: { لَا تُشَدُّ اَلرِّحَالُ إِلَّا إِلَى ثَلَاثَةِ مَسَاجِدَ: اَلْمَسْجِدِ اَلْحَرَامِ, وَمَسْجِدِي هَذَا, وَالْمَسْجِدِ اَلْأَقْصَى } مُتَّفَقٌ عَلَيْهِ 1‏.‏ ‏1 ‏- صحيح.‏ رواه البخاري ( 1197 )‏، ومسلم ( 2 / 975 ‏- 976 / 415 )‏.‏

sunnah.com

also referenced under: Book 5, Hadith 707 (In-Book)