Can Muslims visit graves?
Visiting graves is mustahabb for men, because according to the hadith of Buraydah ibn al-Husayb, the Prophet (peace and blessings of Allah be upon him) said: “I used to forbid you to visit graves , but now visit them.” (Narrated by Muslim, 977), according to another report, “… for they will remind you of the Hereafter.” (Narrated by Ahmad, 1240; Ibn Majah, 1569; classed as sahih by al-Albani in Sahih ibn Majah)
How to say salam to the dead?
When visiting the graves it is mustahabb to greet the occupants of the graves with salam and to make du`a for them saying the words that the Messenger (peace and blessings of Allah be upon him) used to teach his Companions.
It was narrated that `Aishah (may Allah be pleased with her) said to the Prophet (peace and blessings of Allah be upon him): “O Messenger of Allah, what should I say to them (i.e., to the occupants of the graves)?” He said, “Say: Al-salamu ‘ala ahl il-diyar min al-mu’minin wa’l-Muslimin, wa yarham Allah al-mustaqdimina minna wa’l-mustakhirin, wa innaa in sha Allah bikum la lahiqun (Peace be upon the inhabitants of the graves, believers and Muslims. May Allah have mercy upon those who have gone ahead of us and those who come later on, and verily we will, in sha Allah, join you).” (Narrated by Muslim, 974)
It was narrated from Buraydah ibn al-Husayb (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) used to teach them, when they went out to the graveyard , to say: “Al-salamu ‘alaykum ahl al-diaar min al-mu’minin wa’l-Muslimin, wa inna in sha Allah lalahiqun. As-alu Allah lana wa lakum al-‘afiyah (Peace be upon you, O inhabitants of the graves, believers and Muslims. Verily we will, in sha Allah, join you. I ask Allah for well-being for us and for you).””
What to say when you visit the graves of the Companions
With regard to the graves of the Companions, he should say the same du`as as described above; there is no special du`a for that.
What to say when you visit the grave of the Prophet
With regard to visiting the grave of the Prophet (peace and blessings of Allah be upon him) and his two Companions Abu Bakr and ‘Umar (may Allah be pleased with them), what was narrated from the Companions is to greet them with salam.
Ibn ‘Umar used to say, “Al-salamu ‘alayka ya Rasul-Allah, al-salam ‘alayka ya Aba Bakr, al-salamu ‘alayka ya abati (O my father),” then he would go away. This was classed as sahih by al-Hafiz ibn Hajar.
Some of the scholars added to that: “Al-salamu ‘alayka ya khirat Allah min khalqihi, al-salamu ‘alayka ya sayyid al-mursalin, ash-hadu annaka ballaghta al-risalah (Peace be upon you, whom Allah chose from among His creation; peace be upon you O leader of the Messengers, I bear witness that you indeed conveyed the message).” (See al-Adhkar by al-Nawawi, p. 174; al-Mughni, 5/466)
Al-Tabari said: “If the visitor says the above longer version, there is nothing wrong with that, but following the example (of the Sahabah) is better, i.e., limiting oneself to what was narrated from the Companions is better.”
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) said in Manasik al-Hajj wa’l-‘Umrah:
“After (the pilgrim) prays upon arrival in the Prophet’s Mosque as much as Allah wills he should pray, he should go and send salams upon the Prophet (peace and blessings of Allah be upon him) and his two Companions Abu Bakr and ‘Umar (may Allah be pleased with them).
- He should stand in front of the grave of the Prophet (peace and blessings of Allah be upon him), facing the grave and with his back towards the qiblah, and say, “Al-salamu ‘alayka ayyuha’l-Nabiyyu wa rahmat-Allahi wa barakatuhu (Peace be upon you, O Prophet, and the mercy and blessings of Allah).” If he wants to add something appropriate there is nothing wrong with that, such as saying, “Al-salamu ‘alayka ya khalil-Allah wa aminahu ‘ala wahyihi wa khiratahu min khalqihi, ash-hadu annaka qad ballaghta al-risalah wa addayta al-amanah wa nasahta al-ummah wa jahadta fi Allahi haqqa jihadihi (Peace be upon you, O close friend of Allah, the one with whom He entrusted His revelation and the one whom He chose from among His creation. I bear witness that you conveyed the message, fulfilled the trust, sincerely advised the ummah and strove with all your might for the sake of Allah).
But if he limits himself to the first salutation, that is good. Ibn ‘Umar used to say “Al-salamu ‘alayka ya Rasool-Allah, al-salam ‘alayka ya Aba Bakr, al-salamu ‘alayka ya abati (O my father),” then he would go away
- Then he should take one step to his right so that he is in front of Abu Bakr (may Allah be pleased with him) and say, “Al-salamu ‘alayka ya Aba Bakr, al-salamu ‘alayka ya khalifata Rasul-illah (peace and blessings of Allah be upon him) fi ummatihi, radiya Allahu ‘anka wa jazaka ‘an ummati Muhammadin khayran (Peace be upon you, O Abu Bakr, peace be upon you O Successor of the Messenger of Allah (peace and blessings of Allah be upon him) in his ummah, may Allah be pleased with you and reward you with good on behalf of Muhammad).”
- Then he should take one step to his right so that he is in front of ‘Umar (may Allah be pleased with him) and say, “Al-salamu ‘alayka ya ‘Umar, al-salamu ‘alayka ya amir al-muminin, radiya Allahu ‘anka wa jazaka ‘an ummati Muhammadin khayran (Peace be upon you, O ‘Umar, peace be upon you, O leader of the believers, may Allah be pleased with you and reward you with good on behalf of Muhammad).
But he should send salams upon the Prophet (peace and blessings of Allah be upon him) and his two Companions with proper etiquette and in a low voice, for raising the voice in the mosque is forbidden, especially in the Mosque of the Messenger of Allah (peace and blessings of Allah be upon him) and at his grave.” (Manasik al-Hajj wa’l-‘Umrah wa’l-Mashru’ fi’l-Ziyarah, p. 107, 108)
Is saying (al-salamu `alayum) when visiting graves shirk?
If a person says “al-salamu ‘alayum” when visiting graves, and says, “Al-salamu ‘alayka ya Rasul-Allah” when visiting the grave of the Prophet (peace and blessings of Allah be upon him), this is not considered to be shirk, because it is not a prayer to the dead or seeking their help. Rather it is du`a for them, praying that Allah may keep them safe from all the dangers that a person may encounter after death, such as the torment of the grave, the resurrection, the reckoning and the horrors of the Hereafter. (See Zad al-Mustanqi’, 5/473; Ashrat al-Saa’ah by Dr. Yusuf al-Wabil, p. 337)
We ask Allah to keep us safe and sound in this world and in the Hereafter.
And Allah knows best.