Praise be to Allah.
The purpose of visiting the graves
It is prescribed to visit graves to learn a lesson from them and to remember the Hereafter. That is subject to the condition that one does not say anything that will anger the Lord, such as calling upon the one who is buried or seeking his help instead of Allah, or praising him and saying that he is for certain in Paradise, etc.
The purpose of visiting the graves is twofold:
– The visitor benefits from remembering death and the dead, remembering that their destiny will be either Paradise or Hell. This is the primary purpose of the visit.
– The deceased also benefits and is treated kindly by the visitor greeting him with salams , making du’a for him, praying for forgiveness for him. This applies only to Muslims.
Making du’a when visiting the grave
Among the du’as that may be recited are:
“Assalamu ‘alaykum ahl al-diyar min al-muminin wa’l-Muslimin, wa inna in sha Allah bikum lahiqun, as alu Allaha lana wa lakum al-‘afiyah (peace be upon you O people of the dwellings, believers and Muslims, In sha Allah we will join you, I ask Allah to keep us and you safe and sound).”
It is permissible to raise the hands when reciting this du’a, because of the hadith of ‘Aishah who said: “The Messenger of Allah (peace and blessings of Allah be upon him) went out one night, and I sent Barirah to follow him and see where he went. She said, ‘He went towards Baqi’ al-Gharqad [the graveyard in Madinah], and he stood at the bottom of al-Baqi’ and raised his hands, then he went away.’ Barirah came back to me and told me, and when morning came I asked him about it. I said, ‘O Messenger of Allah, where did you go out to last night? He said, ‘I was sent to the people of al-Baqi’, to pray for them.’”
Etiquette of visiting graves
But you should not face the grave when making du’a for them; rather you should face the direction of the Ka’bah. The Prophet (peace and blessings of Allah be upon him) forbade prayer (salah) facing graves, and du’a is the heart and soul of salah, as is well known, and is subject to the same rulings.
The Prophet (peace and blessings of Allah be upon him) said: “Du’a is worship” then he recited the ayah (interpretation of the meaning): “And your Lord said: “Invoke Me [i.e. believe in My Oneness (Islamic Monotheism) and ask Me for anything] I will respond to your (invocation).” [Ghafir 40:60]
You should not walk between the graves of the Muslims wearing your shoes . It was narrated that ‘Uqbah ibn ‘Amir (may Allaah be pleased with him) said: “The Messenger of Allah (peace and blessings of Allah be upon him) said: ‘If I were to walk on hot coals or on a sword, or if I were to mend my shoes using my feet, that would be better for me than if I were to walk on the grave of a Muslim. And it makes no difference to me if I were to relieve myself in the midst of the graves or in the middle of the market-place [i.e., both are equally bad].’” (Narrated by Ibn Majah, 1567)
We ask Allah, the Most High, the Omnipotent, to have mercy upon our dead and the deceased Muslims.
And Allah knows best.