Visiting Graves
What the Prophet ﷺ taught about grave visits — first forbidden, then permitted as a reminder of death — the salutation he taught for entering a graveyard, and the etiquette that keeps a visit within the bounds of the Sunnah.
First forbidden, then encouraged
In the earliest years of Islam, the Prophet ﷺ forbade visiting graves outright — scholars explain this was to protect a new community, many only recently removed from pre-Islamic practices around the dead, from anything that could slide into venerating the deceased. Once that risk had passed, he ﷺ reversed the ruling and began actively encouraging grave visits, for a very different reason: as a reminder of death and the Hereafter.
Hadith — sahih
نَهَيْتُكُمْ عَنْ زِيَارَةِ الْقُبُورِ فَزُورُوهَا
"I forbade you to visit graves, but you may now visit them …"
Sahih Muslim 977
The reason for the change is spelled out in a related hadith, where the Prophet ﷺ himself set the example — visiting his own mother's grave:
Hadith — sahih
زَارَ النَّبِيُّ صلى الله عليه وسلم قَبْرَ أُمِّهِ فَبَكَى وَأَبْكَى مَنْ حَوْلَهُ فَقَالَ «اسْتَأْذَنْتُ رَبِّي فِي أَنْ أَسْتَغْفِرَ لَهَا فَلَمْ يُؤْذَنْ لِي وَاسْتَأْذَنْتُهُ فِي أَنْ أَزُورَ قَبْرَهَا فَأُذِنَ لِي فَزُورُوا الْقُبُورَ فَإِنَّهَا تُذَكِّرُ الْمَوْتَ»
"The Messenger of Allah ﷺ visited the grave of his mother and he wept, and moved those around him to tears, and said: 'I sought permission from my Lord to ask forgiveness for her, but it was not granted to me. Then I sought permission to visit her grave, and it was granted to me. So visit the graves, for that makes you mindful of death.'"
Sahih Muslim 976
That's the entire purpose of the practice as the Sunnah frames it: standing at a grave to be reminded, honestly and physically, that death is real and coming — not a ritual owed to the deceased, and not an act that carries any reward for them beyond the visitor's own dua on their behalf.
What to say when entering a graveyard
The Prophet ﷺ taught his companions a specific greeting to offer on entering a cemetery — a salutation to the dead paired with a dua asking Allah for well-being for both the dead and the living:
Hadith — sahih
السَّلاَمُ عَلَيْكُمْ أَهْلَ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَإِنَّا إِنْ شَاءَ اللَّهُ لَلَاحِقُونَ أَسْأَلُ اللَّهَ لَنَا وَلَكُمْ الْعَافِيَةَ
As-salamu 'alaykum ahl ad-diyari minal-mu'minina wal-muslimin, wa inna in sha' Allahu la-lahiqun. As'alullaha lana wa lakumul-'afiyah.
"Peace be upon you, abode of a believing people. We shall, if Allah wills, join you. I ask Allah for well-being for us and for you."
Sahih Muslim 975
Beyond the salutation, a visit is simply an occasion to make dua for the deceased — asking Allah's mercy and forgiveness for them — and to reflect on one's own mortality. Reciting Qur'an quietly and supplicating for the dead is widely practiced; no additional ritual is required or prescribed beyond that.
The two graves and the palm frond
One of the most cited hadith on this subject shows how seriously the punishment of the grave can turn on things that look small from the outside. The Prophet ﷺ once passed two graves and perceived that their occupants were being punished:
Hadith — sahih, agreed upon
مَرَّ النَّبِيُّ صلى الله عليه وسلم بِحَائِطٍ مِنْ حِيطَانِ الْمَدِينَةِ أَوْ مَكَّةَ، فَسَمِعَ صَوْتَ إِنْسَانَيْنِ يُعَذَّبَانِ فِي قُبُورِهِمَا، فَقَالَ النَّبِيُّ صلى الله عليه وسلم: «يُعَذَّبَانِ، وَمَا يُعَذَّبَانِ فِي كَبِيرٍ»، ثُمَّ قَالَ: «بَلَى، كَانَ أَحَدُهُمَا لاَ يَسْتَتِرُ مِنْ بَوْلِهِ، وَكَانَ الآخَرُ يَمْشِي بِالنَّمِيمَةِ». ثُمَّ دَعَا بِجَرِيدَةٍ فَكَسَرَهَا كِسْرَتَيْنِ، فَوَضَعَ عَلَى كُلِّ قَبْرٍ مِنْهُمَا كِسْرَةً. فَقِيلَ لَهُ: يَا رَسُولَ اللَّهِ، لِمَ فَعَلْتَ هَذَا؟ قَالَ: «لَعَلَّهُ أَنْ يُخَفَّفَ عَنْهُمَا مَا لَمْ تَيْبَسَا أَوْ إِلَى أَنْ يَيْبَسَا».
The Prophet ﷺ passed by a garden wall in Madinah or Makkah and heard the voices of two people being tortured in their graves. He ﷺ said, "They are being punished, and they are not being punished for anything major." Then he added, "Yes indeed — one of them never used to shield himself from his urine, and the other used to go about spreading malicious gossip." He ﷺ then called for a fresh palm frond, broke it into two pieces, and placed one on each grave. When asked, "O Messenger of Allah, why did you do this?" he said, "I hope that their punishment may be lightened for as long as these do not dry out."
Sahih al-Bukhari 216, narrated by Ibn 'Abbas (رضي الله عنهما)
Two things stand out in how the hadith describes the sins involved. Neither is theft, nor violence, nor anything that looks dramatic — one is carelessness about urine soiling the body or clothing (a basic matter of purity for prayer), the other is namimah, carrying tales between people to stir up enmity. The Prophet's ﷺ own comment — "they are not being punished for anything major" — is usually read by scholars two ways at once: these sins are easy to avoid, and they are anything but minor in their consequence. The palm frond itself isn't treated in Islamic scholarship as an act to be repeated at will over any grave; it's understood as something particular to that moment, granted to the Prophet ﷺ through his knowledge of the unseen, not a general ritual for visitors to imitate.
Etiquette — a visit, not worship
A grave visit is for reflection and dua, not a ritual owed to the deceased. The Prophet ﷺ permitted and encouraged visiting graves as a reminder of death and an occasion to supplicate for the deceased (Sahih Muslim 977, 976) — but directing worship, vows, or requests to anyone buried there, touching or kissing graves for blessing, or circling them, crosses into practices the Qur'an and Sunnah are explicit in warning against. Keep dua directed to Allah alone at every grave, exactly as at home.
Do
- Offer the salutation taught above on entering
- Make dua asking Allah's mercy and forgiveness for the deceased
- Reflect quietly on death and the Hereafter
- Keep the visit calm and respectful of other graves nearby
Don't
- Direct worship, vows, or requests to the deceased
- Touch, kiss, or circle a grave seeking blessing
- Treat any grave as a place of ritual beyond dua and reflection
- Wail, raise the voice in distress, or make it a social occasion
This page covers the Sunnah on grave visits generally. For visiting the specific historic cemeteries in Makkah and Madinah — Jannat al-Mu'alla and Jannat al-Baqi — see the
Ziarah guide on the DIY Umrah page. For broader questions,
ask them here or consult a knowledgeable scholar.
Ziarah guide — Makkah & Madinah cemeteries →