Sahih Muslim 3386
The Book of Pilgrimage
وَحَدَّثَنَا هَارُونُ بْنُ سَعِيدٍ الأَيْلِيُّ، حَدَّثَنَا ابْنُ وَهْبٍ، حَدَّثَنِي عَبْدُ الْحَمِيدِ بْنُ جَعْفَرٍ، أَنَّ عِمْرَانَ بْنَ أَبِي أَنَسٍ، حَدَّثَهُ أَنَّ سَلْمَانَ الأَغَرَّ حَدَّثَهُ أَنَّهُ، سَمِعَ أَبَا هُرَيْرَةَ، يُخْبِرُ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " إِنَّمَا يُسَافَرُ إِلَى ثَلاَثَةِ مَسَاجِدَ مَسْجِدِ الْكَعْبَةِ وَمَسْجِدِي وَمَسْجِدِ إِيلِيَاءَ " .
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)
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.