Answered by Shaykh Faraz Rabbani
Question: Which duas and parts of the Qur’an should be read when visiting a graveyard? Where should a person stand at a grave?
Answer: In the name of Allah, Most Compassionate, Most Merciful,
Anything of the Qur’an may be recited; Ya Sin is particularly praiseworthy. If one does not have the time, one may recite Ayat al-Kursi, the final verses of Surat al-Baqara, and the 3 Quls.
One should face the chest of the deceased. Given that the deceased is facing the qibla, this would normally mean standing facing away from the qibla. Some say that when visiting the scholars or righteous, one should stand at their feet, as this is closer to respect.
And Allah alone gives success.