The famous muhaddith of the Hanafi mazhab, Mulla Ali Qaari (rahimahullah), has written that there is consensus that to visit the grave of Rasulullah (sallallahu ‘alaihi wasallam) is an important act of virtue and piety, and a very desirable form of ibaadah. It is also a successful way to attain spiritual elevation and a cause for gaining the intercession of Rasulullah (sallallahu ‘alaihi wasallam).
Some Ulamaa have mentioned that it is waajib (obligatory) upon the person who has the means to reach Madinah Munawwarah. The renowned jurist, Allaamah Shaami (rahimahullah), has quoted this view from Haafiz Ibnu Hajar (rahimahullah), that to avoid going to Madinah Munawwarah is an act of sheer negligence and disregard.
In view of the countless favours of Rasulullah (sallallahu ‘alaihi wasallam) on the ummah, it is the right that we owe Rasulullah (sallallahu ‘alaihi wasallam) that we visit his mubaarak raudhah if we have the means to do so. It is indeed unfortunate if one travels for haj or umrah, and despite having the means, he does not visit the raudah mubaarak.
There is consensus among the four mazhabs that it is mustahab to visit the grave of Rasulullah (sallallahu ‘alaihi wasallam). [1]
[1] فضائلِ حج صـ 179-180