It was narrated from Ibn Mas’ud that the Messenger of Allah (ﷺ) said, “I used to forbid you to visit the graves, but now visit them, for they will draw your attention away from this world and remind you of the Hereafter.”
Hadith No. 1571
Sunan Ibn Majah
Gradings:
Al-Albani:
Daif
Muhammad Fouad Abd al-Baqi:
Daif
Zubair Ali Zai:
Daif