his journey, to shorten his prayers? And is this visit prescribed in Islam or not?
It has been reported that the Prophet—may Allah bless him and grant him peace—said:
‘Whoever performs Hajj but does not visit me has slighted me.’
And:
‘Whoever visits me after my death, it is as though he visited me during my lifetime.’
It has also been reported that he said:
‘No journey should be undertaken except to three mosques: the Sacred Mosque, al-Aqsā Mosque, and this mosque of mine.’”
The wording of the answer:
Praise be to Allah. Regarding someone who travels solely to visit the graves of the prophets and the righteous, there are two well-known views on whether he may shorten his prayers.
The first is that shortening the prayers on such a journey is not permissible, because it is a prohibited journey. This is the view of the earlier scholars who do not permit shortening prayers on a sinful journey and who regard this journey as sinful, such as Abū ‘Abd Allāh ibn Battah, Abū al-Wafā’ ibn ‘Aqīl, and many groups of earlier scholars. The position of Mālik, al-Shāfi‘ī, and Ahmad is that prayers may not be shortened on a journey prohibited by Islamic law.
The second view is that prayers may be shortened on such a journey. This is held by those who permit shortening prayers on a prohibited journey, such as Abū Hanīfah. It is also held by some later followers of al-Shāfi‘ī and Ahmad who permit travelling to visit the graves of the prophets and the righteous, such as Abū Hāmid al-Ghazālī, Abū Muhammad al-Maqdisī, and Abū al-Hasan ibn ‘Abdūs