My question is about travelling to visit mosques other than the three mosques Al Haram, the Prophet's mosque and Al Aqsa. Is this allowed in Islam?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Abu Hurayrah narrated that the Prophet said: “Do not set out on a journey (for religious worship) except for three mosques: Al-Masjid Al-Haraam, my Mosque (at Madeenah) and Al-Aqsa Mosque (in Jerusalem).” [Ahmad, Al-Bukhaari, Muslim, and others]
So, it is unlawful to travel from one place to another to visit a mosque for any purpose whatsoever except if that mosque is one of the three mentioned in the Hadeeth.
It is reported in a narration that Abu Hurayrah once went to Ath-Thawr Mount to stand where Prophet Moses stood seeking blessing, when he came back his companion Abu Basrah Al Ghifaari said to him: “Had I met you before you left I wouldn't have let you go”. Abu Hurayrah, agreed upon that. So, it is unlawful to travel to any place in the world to seek blessing or pray or do any other acts of worship except the three mentioned mosques.
We conclude by saying “it is unlawful to travel in order to visit any mosque on earth except the three mosques. But it is lawful to travel to visit scholars and pious people or to seek knowledge or to trade… etc”.
Allah knows best.
You can search for fatwa through many choices