Dua and Dhikr
When visiting the graves.
السَّلامُ عَلَـيْكُمْ أَهْلَ الدِّيارِ مِنَ المؤْمِنيـنَ وَالْمُسْلِمين وَإِنّا إِنْ شاءَ اللهُ بِكُـمْ لاحِقـون نَسْـاَلُ اللهَ لنـا وَلَكُـمْ العـافِيَة
Assalāmu `alaykum ahlad-diyāri minal-mu'minīna wa ‘l-muslimīn. wa innā in shā' Allāhu bikum lāḥiqūnnas'alullāha lanā wa lakumul-`āfiyah.
(Peace be upon you, people of this abode, from among the believers and those who are Muslims, and we, by the Will of Allah, shall be joining you.[May Allah have mercy on the first of us and the last of us] I ask Allah to grant us and you well-being.)
It was narrated from Sulaiman bin Buraidah that his father said:
“The Messenger of Allah (ﷺ) used to teach them, when they went out to the graveyard, to say: As-salamu ‘alaykum ahlad-diyar minal-mu’minina wal- muslimin, wa inna insha’ Allah bikum lahiqun, nas’alul-laha lana wa lakumul-‘afiyah (Peace be upon you, O inhabitants of the abodes, believers and Muslims, and we will join you soon if Allah wills. We ask Allah for well-being for us and for you).’”
(Sunan Ibn Majah 1547)