In The Name of Allaah, The Most Merciful, The Bestower of Mercy.
Aa’isha [radiyallaahu anhaa] said, “Allaah’s Messenger [sallal laahu alayhi wasallam] said, ‘May Allaah curse the Jews and Christians [i.e. those amongst them who corrupted the religion of their prophets], for they took the graves of their Prophets as places of worship’”. Then Aa’isha said, “Had that not been the case, his grave would be in an open place, but he feared that it would be taken as a place of worship”.
[Saheeh Al-Bukhaari Bukhaari 1330]
Imaam Muhammad Naasiruddeen Al-Albaanee [rahimahullaah] said,
“The statement of “Aa’Isha [radiyallaahu anhaa] clearly shows the reason why the Prophet [sallal laahu alayhi wasallam] was buried in his house and that was to prevent the one who would build a Masjid over him. And it not permissible to use this as evidence to bury others in a house and what supports this is that it is in opposition to the original Islamic practice, because the Sunnah (legislates) that the deceased are buried in the graveyards. This is why Ibn Urwah [rahimahullaah] stated in Al-Kawaakib Ad-Daraaree, “To be buried in the graveyards of the Muslims was more pleasing to Abu Abdillaah – meaning Al-Imaam Ahmad – than being buried in the houses, because it poses lesser harm to those who are alive with regards to worshiping images [i.e. keep people away from worshipping the deceased], more similar to a place of the afterlife, more supplication for the person and seeking forgiveness for him. The companions, the Taabi’een and those after them did not cease burying the deceased in the desert”.
And if it is said, “The Prophet’s grave is in his house as well as the graves of his two companions (i.e. Abu Bakr and Umar)”, so we say, “Aaisha said, ‘Indeed, the Prophet [sallal laahu alayhi wasallam] asked to be buried in his house so that his grave is not taken as a place of worship, because he used to bury his companions at Al-Baqee and his practice is more worthy to be followed than that of others. His companions knew that he- in particular – was to be buried in his house, because he said, ‘The Prophets are to be buried where they die’”. This protects [the place they are buried from too much noise] and distinguish them from other people. [Ref 1]
The late Mufti of Saudi Arabia Imaam Abdul Azeez Bin Baaz [may Allaah have mercy upon him] said:
Shrines are graves and the Prophetic tradition regarding this affair is that graves are to be raised a hand span from the ground, so that they are recognised as graves and not degraded. This is why in the hadeeth of Sa’d Bin Abee Waqqaas [radiyallaahu-anhu] it is reported that the grave of the Prophet [sallal laahu alayhi wasallam] was raised a hand span and Sa’d also gave orders that the same should be done to his grave. As for building over them, taking them as Masaajid and building domes, this is not permissible. According to the people of knowledge, this is evil, innovation in religion and one of the means to Shirk. And due to this the Prophet [sallal laahu alayhi wasallam] stated in an authentic hadeeth: “The curse of Allaah is upon the Jews and Christians [i.e. those Jews who deviated from the pure message of Moosaa and those Christians who deviated from the pure message of the Messiah], because they took the graves of their Prophets as places of worship”. And in a hadeeth in Saheeh Muslim, the Prophet [sallal laahu alayhi wasallam] forbade that graves should be plastered (made into permanent structures), used as sitting places and building over them. Therefore, it is not permissible to build over graves – neither mosques nor domes, nor other than them, and also they are not to be plastered, because indeed this is one of the means to Shirk – one of the means, because it becomes exalted, invoked besides Allaah and help sought from it, and thus shirk occurs. Building over graves- placing domes, mosques and lamps over them are from the means to Shirk, and this is why the Prophet [sallal laahu alayhi wasallam] warned against it and cursed those who do so.
It is obligated on the Muslims to be warned against this and that they do not build over a grave – neither a Masjid nor other than it, neither a dome nor plastered, neither place lamps on them nor shrouded. All this is not permissible, rather it is from the means to Shirk…. [Ref 2]
Who Included The Grave of The Prophet [sallal laahu alayhi wasallam] In The Masjid?
Shaikh Abdul Waahid Abu Khadeejah [hafidhahullaah] stated as follows:
The grave of the Prophet (salallāhu ‘alaihi wasallam) was initially outside of his Mosque in Madeenah – the fact is that his house was next door to the Mosque and that is where he was buried after his death. Later, in the time of the rule of Waleed Ibn Abdul-Malik he commanded that Mosque be expanded, and thus the house of the Prophet (salallāhu ‘alaihi wasallam) was included into the Mosque as it was extended. This occurred at the displeasure of the Scholars – and they hated it – from them, Sa’eed Ibn Al-Musayyib (died 94H).
As for the green dome that was erected high over the grave of the Prophet (salallāhu ‘alaihi wasallam), then it was built at the end of the 6th century – it was built by one of the kings of Egypt. So whoever uses the grave of the Prophet (salallāhu ‘alaihi wasallam) in the Mosque as a proof, or the presence of the green dome then, in reality, he has no proof at all. That is because these constructions and affairs were initiated by people ignorant and devoid of knowledge. They had authority and the people were not able to prevent them. So they did what they did due to their claim that they were expressing their love of the Prophet (salallāhu ‘alaihi wasallam) and respect for him.
This green dome at the Prophet’s Mosque in Madeenah, over his grave, was a later addition of the sixth century. It was not built or approved by the Companions or by the early scholars and well-known Imāms. [Ref 3]
Ref 1: An Excerpt from Tahdheer As-Saajid Min Itti-khaadhil Quboor Masaajid. Pages 14-15. Slightly paraphrased
Ref 3: https://www.abukhadeejah.com/decisive-proofs-against-the-sufis-who-take-graves-as-places-of-worship-the-condemnation-of-the-one-who-worships-allah-at-the-grave-of-a-righteous-man-so-how-much-worse-is-the-one-who-actually-worsh/