كتاب الحج
15  
The Book of Pilgrimage
(95)
Chapter: The virtue of the Three Masajid
(95)
باب لاَ تُشَدُّ الرِّحَالُ إِلاَّ إِلَى ثَلاَثَةِ مَسَاجِدَ ‏‏
Sahih Muslim 1397 c

Abu Haraira (Allah be pleased with him) reported Allah's Messenger (way peace be upon him) as saying:

One should undertake journey to three mosques: the mosque of the Ka'ba, my mosque, and the mosque of Elia (Bait al-Maqdis).
وَحَدَّثَنَا هَارُونُ بْنُ سَعِيدٍ الأَيْلِيُّ، حَدَّثَنَا ابْنُ وَهْبٍ، حَدَّثَنِي عَبْدُ الْحَمِيدِ بْنُ جَعْفَرٍ، أَنَّ عِمْرَانَ بْنَ أَبِي أَنَسٍ، حَدَّثَهُ أَنَّ سَلْمَانَ الأَغَرَّ حَدَّثَهُ أَنَّهُ، سَمِعَ أَبَا هُرَيْرَةَ، يُخْبِرُ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ إِنَّمَا يُسَافَرُ إِلَى ثَلاَثَةِ مَسَاجِدَ مَسْجِدِ الْكَعْبَةِ وَمَسْجِدِي وَمَسْجِدِ إِيلِيَاءَ ‏"‏ ‏.‏
Reference : Sahih Muslim 1397c
In-book reference : Book 15, Hadith 590
USC-MSA web (English) reference : Book 7, Hadith 3220
  (deprecated numbering scheme)