عن أبي مَرْثَدٍ الغَنَوِيّ رضي الله عنه قال: قال رسول الله صلى الله عليه وسلم: «لَا تَجْلِسُوا عَلَى الْقُبُورِ، وَلَا تُصَلُّوا إِلَيْهَا».
The Prophet (may Allah's peace and blessings be upon him) forbade sitting on the graves. He also forbade praying while facing the graves if the grave lies in the direction of the Qiblah for the praying person because this is one of the means leading to polytheism.
Download for free and never miss a prayer again