Sunan Abi Dawud

Hadith #3235

Narrated Buraidah:The Messenger of Allah (ﷺ) as saying: I forbade you to visit graves, but you may now visit them, for in visiting them there is a reminder (of death)