Summary: It is permitted for women to visit graveyards occasionally to be reminded of death and to supplicate for their deceased ones. They should dress appropriately as always, not recite from the mushaf (and then pass the reward of that to the deceased), or chant dhikrs, or wail, etc. All of these are innovations of the Sufis and unlearned people. She doesn’t need to be in wudoo, nor is she excluded due to menstruation. The salaam and du’ā to be recited are mentioned at the end of this article.
Ibn Abbās (radiyallāhu ‘anhumā) said: “Allah’s Messenger invoked the curse of Allah upon the women who continually visit the graves and those people who build mosques (places of devotion) over them and place lights over them.” Reported by the authors of the Sunan.
[This hadeeth is authentic due to its collective chains of transmission. For this reason, Al-Albānee declared it to be saheeh in Saheeh Al-Jāmi’ no. 4985. It was reported from Ibn ‛Abbās, Abu Hurayrah and Hassān Ibn Thābit (radiyallāhu ‘anhum).]
So based upon this, there is the curse of Allah upon the women who constantly visit the graves ―and due to their plentiful visitations that are polytheistic in nature ―and it is, for this reason, the term in the hadeeth refers to those women who visit graves excessively. For this reason, many scholars regard this ruling to be specific to those women who make excessive visits to the graves ―visitations that involve polytheism and religious innovations for which there is no proof in the texts.
The fact that this narration is specific to women is an indication that they are more likely to fall prey to superstitious practices and deviated beliefs that are based upon ambiguities and distortions [of texts]. And whoever ponders over the condition of the people knows this.
Some of the scholars state that this prohibition of visiting the graves [for women] was before permission was granted for them to visit. Permission to visit the graves occurs in an authentic hadeeth reported by Muslim wherein the Prophet (salallāhu ‘alaihi wasallam) said: “I used to forbid you from visiting the graves ―but visit them, for indeed they will remind you of the Hereafter.”
[Reported by Muslim, no. 977 from the hadeeth of Buraidah (radiyallāhu ‘anhum) without the addition, “for indeed they will remind you of the Hereafter.” With this wording, it is reported by Ahmad in his Musnad, 5/355, no. 23055]
So after this came the general allowance for men and women, those scholars who hold that it is allowed for women to visit graves [occasionally] use as a proof the occasion the Prophet (salallāhu ‘alaihi wasallam) passed by a woman who was crying next to a grave.
This hadeeth is reported by Bukhāree (no. 1283) and Muslim (no. 926) from Anas Ibn Mālik (radiyallāhu ‘anhu), who said: The Prophet passed by a woman who was crying next to a grave. So, he said to her: “Have taqwā of Allāh and be patient.” So she responded: “Go away! For you have not been afflicted with my affliction.” She had not recognised him. So it was said to her: “That was the Prophet.” So she went to the door of the Prophet (salallāhu ‘alaihi wasallam) and did not find any guards there. So she said to him: “I did not recognise you.” So he said: “Indeed patience is to be observed at the first strike of calamity.” So here the Prophet (salallāhu ‘alaihi wasallam) did not forbid her from visiting the grave. The scholars also prove that it is allowed for women to visit the graves because ‛Ā’ishah (radiyallāhu ‘anhā) visited the grave of her brother.
[Reported by Abdur-Razzāq in Al-Musannaf, 3/570, no. 6711; authenticated by Al-Albānee in Al-Irwā, no. 775]
The prohibition for women that is reported in the hadeeth does not refer to the visitation that is in accordance to the Sunnah ―rather the prohibition refers to the visitation that involves innovations and polytheistic practices. That is because visiting that is based upon the Sunnah does not entail the person being cursed. The curse is upon the one who does something forbidden, so the hadeeth refers to those women who do that which is forbidden ―it is for this reason the Prophet (salallāhu ‘alaihi wasallam) invoked the curse of Allah upon them.
The proof for this is in his (salallāhu ‘alaihi wasallam) describing them as “those who set up mosques and place lights over them (i.e. the graves)…” Thus, no one establishes mosques (places of worship) and lights over graves except the people of superstitious, misguided beliefs.
The difference between the innovated visiting and the polytheistic visiting of graves
The innovated visit: This is where the intent and thinking is that the worship and supplication next to a grave is a reason for the reward being multiplied and the worship being accepted.
The polytheistic visit: This is when the deceased is invoked, and needs are sought from him ―and this occurs more often with women (though many of these innovations are initiated by men and encouraged among women).
As for the visitation that is based upon the Sunnah: This is where one’s intent is to supplicate for the deceased. This is allowed for both men and women in general. ‘Ā’ishah (radiyallāhu ‘anhā) said to the Prophet (salallāhu ‘alaihi wasallam): “How should I address them, O Allah’s Messenger?” He replied: “Say: Peace be upon the inhabitants of this place from the Believers and the Muslims ―and may Allah’s mercy be upon those who have gone ahead from us, and those who will come later on ―and indeed we shall, inshā’ Allāh, join you.” [Reported by Muslim, no. 249]. So this is the correct position in this matter, inshā’ Allāh. Here is the du’ā in Arabic:
السَّلَامُ عَلَيْكُمْ أَهْلَ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَإِنَّا إِنْ شَاءَ اللهُ لَلَاحِقُونَ أَسْأَلُ اللهَ لَنَا وَلَكُمُ الْعَافِيَةَ
As-salāmu ʿalaykum ahlad-diyāri mina al-mu’minīna wal-muslimīna, wa innā inshā’ Allāhu la-lāhiqūn, as’alu Allāha lanā wa lakum al-ʿāfiyah.
“Peace be upon you, O inhabitants of this place: Believers and Muslims—and indeed we shall, inshā’ Allāh, be joining you. I ask Allah for us and for you, well-being (and safety).” (Muslim, no. 975)
And with Allah lies success and guidance.
(See: Imam Ahmad an-Najmi’s (rahimahullāh) explanation of Kitāb at-Tawheed, Chapter 21)
Jazakallahu Khayran and the best explanation i found so far alhamdulillah