Traveling to visit the graves of the prophets, righteous people, and others
It is not permissible
to undertake journeys to visit graves of the prophets, righteous people and others. Doing so is a Bid`ah (innovation in religion). The evidence for this is the Hadith of the Prophet (peace be upon him):
Do not undertake a journey except to three Masjids (mosques):
Al-Masjid Al-Haram (the Sacred Mosque in Makkah), this Masjid of mine (the Prophet's Mosque), and
Al-Masjid Al-Aqsa (the Mosque in Jerusalem).
The Prophet (peace be upon him) said:
He who does any act for which there is no sanction from our behalf, it is to be rejected.
Visiting graves without undertaking journeys to visit them is a Sunnah (a commendable act). The Prophet (peace be upon him) said:
Visit the graves for they remind you of the hereafter.
Muslim in his Sahih "authentic" Book of Hadith).
May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.