Hadith 6:1007
Yazid ibn Harun narrated to us, from Hammad ibn Salamah, from Ali ibn Zayd, from Rabi’ah ibn al-Nafi’, from his father, from Ali, who said: The Messenger of Allah (may Allah bless him and grant him peace) forbade the visiting of graves. Then he said: "I had forbidden you from visiting graves, so visit them, for they remind you of the Hereafter."
حدثنا يزيد بن هارون عن حماد بن سلمة عن علي بن زيد عن ربيعة بن النافعة عن أبيه عن علي قال نهى رسول الله صلى الله عليه وسلم عن زيارة القبور ثم قال اني كنت نهيتكم عن زيارة القبور فزوروها تذكركم الآخرة