Visiting graves without traveling specifically for this purpose

Question 319: A man told me that a Hadeeth states, Do not set out on a journey but to three Masjids (mosques)… He inquired whether it is Haraam (prohibited) to visit the grave of Al-Husayn or Al-Sayyidah Zaynab with the sole intention of visiting the grave, not to offer Salaah (Prayer) in the Masjid or seek the blessing of the deceased.

Answer: It is permissible for men to visit graves without traveling specifically to visit them, according to the statement of the Prophet (peace be upon him), Visit the graves, for they remind you of the Hereafter. Related by Imaam Muslim in his Saheeh (authentic) Book of Hadeeth. However, it is Haraam to travel especially to visit them, seek blessings in them and those buried in them, or offer Salaah there, according to the Prophet’s statement, Do not set out on a journey but to three Masjids: Al-Masjid al-Haram (the Sacred Mosque), this mosque of mine (the Prophet’s Mosque), and Al-Aqsaa’ Mosque (in Jerusalem). The Prophet (peace be upon him) also stated... read more here.