Question:
This inquirer is asking about the authenticity of the hadith narrated from the Prophet ﷺ when Aisha (may Allah be pleased with her) asked him to teach her the supplication to say when visiting graves, and he taught her. Is this hadith authentic, and does it indicate the permissibility of women visiting graves?
Answer:
The Hadith is authentic; however, it occurred during the period of [general] permission. He [the Prophet ﷺ] had initially forbidden everyone [from visiting graves] and then granted permission to everyone; Subsequently, the final Sunnah established a prohibition for women [from visiting graves], while continuing to command men to visit them.
When people first embraced Islam, he [the Prophet ﷺ] forbade them from visiting graves because they had only recently left [the period of] disbelief. Thus, this became a protection for them against polytheism and a means of keeping them far removed from it.
Then he—peace and blessings be upon him—granted permission to everyone. Ultimately, the Sunnah settled on prohibiting women from visiting [graves] while men were commanded to visit them.
His (ﷺ) words to Aisha occurred at the time when visiting [graves] was permitted for everyone—for both men and women.