Sunan Ibn Majah

Hadith #1571

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.”