Rafiq Ask Rafiq

What du'a do I say when visiting graves?

The Sunnah gives one du'a for visiting graves, and it is the same one the Prophet ﷺ taught his Companions to say when they set out for the graveyard. You greet the dead, acknowledge that you are following them, and ask Allah for well-being for yourself and for them.

The du'a

السَّلَامُ عَلَيْكُمْ أَهْلَ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ، وَإِنَّا إِنْ شَاءَ اللَّهُ بِكُمْ لَاحِقُونَ، أَسْأَلُ اللَّهَ لَنَا وَلَكُمُ الْعَافِيَةَ— Sahih Muslim 975, from Buraydah

As-salamu 'alaykum ahl al-diyar min al-mu'minin wa'l-muslimin, wa inna in sha' Allahu bikum lahiqun, as'alullaha lana wa lakum al-'afiyah.

"Peace be upon you, O people of the dwellings, from among the believers and Muslims. And indeed, if Allah wills, we are to join you. I ask Allah for well-being for us and for you."

What each phrase is doing

The greeting opens with salam — peace — addressed to the inhabitants of the graves as a body of believers, not to one person by name. "People of the dwellings" treats the graveyard as a place where a community now resides, which is why the greeting is plural even when you have come for one grave.

"And indeed, if Allah wills, we are to join you" is the sentence that turns the visit inward. You are not standing apart from the dead; you are stating that the same road is ahead of you. The scholars note that this is where the visit does its work — it softens the heart toward the hereafter.

The closing request, "well-being for us and for you", asks al-'afiyah for both sides at once: for the living, safety in this world and the next; for the dead, ease in what they now face.

When you say it

The Prophet ﷺ taught it as the words to say on entering the graveyard — the narration in Sahih Muslim describes him teaching the Companions this du'a "when they went out to the graves." So it is said as you arrive and come among the graves, before or as you stand at a particular one. It is a greeting, so it comes first; any further du'a for the deceased follows it.

If you want to add the longer wording

Some narrations and du'a collections add a line after the greeting:

"May Allah have mercy on those who have gone ahead of us and those who are to follow."— Sahih Muslim 974, from 'A'ishah

This is a sound addition to the same du'a, and it carries the same meaning as the rest — the living and the dead are one community, and mercy is asked for both.

A note on visiting itself

Visiting graves is permitted and encouraged for men. The Prophet ﷺ said:

"I used to forbid you from visiting the graves, but now visit them."— Sahih Muslim 977, from Buraydah

Aisha رضي الله عنها also narrated that the Prophet ﷺ gave the concession for visiting graves (Sunan Ibn Majah 1570). Imam Tirmidhi records that some scholars held the earlier prohibition applied before the concession was given, and that when it came, it covered both men and women; others held the dislike was specific to women out of concern for excessive wailing. What is not disputed is that the visit is legislated, and that this du'a is what is said.

Key takeaways

  • The du'a of the graveside is the greeting of peace, the acknowledgment that you will follow, and the request for well-being for both the living and the dead.
  • Say it on entering the graveyard, as the Prophet ﷺ taught the Companions when they set out for the graves.
  • Address the dead collectively — "O people of the dwellings" — even when you have come for one grave.
  • The visit is permitted and encouraged; the earlier prohibition was lifted by the Prophet's ﷺ concession.
  • Any further du'a for the deceased comes after this greeting, not in place of it.

And Allah knows best.

Answered by Rafiq AI from the Qur'an, the hadith and the works of the scholars ·

This is a guide to what the scholars have said, not a fatwa. For your own situation, ask a qualified scholar who can hear the details.

Have a question of your own?

Ask Rafiq — it's free