History of the Green Dome in Madinah
Question

Could you please tell me more about the green dome in Madinah: its history and the ruling on its construction and on leaving it as it is?
Praise be to Allah.History of the Green Dome 
The dome over the grave of the Prophet (peace and blessings of Allah be upon him) dates back to the seventh century AH. It was built during the reign of Sultan Qalawun, and at first it was the colour of wood, then it became white, then blue, then green, and it has remained green until the present. 
Professor ‘Ali Hafiz (may Allah preserve him) said: 
“There was no dome over the sacred chamber. There was in the roof of the mosque above the chamber a waist-high enclosure of brick to distinguish the location of the chamber from the rest of the mosque’s roof. 
Sultaan Qalawun al-Salihi was the first one to build a dome over the chamber. He did that in 678 AH. It was square at the bottom and octagonal at the top, made of wood, and built on top of the pillars that surrounded the chamber. Planks of wood were nailed to it, over which plates of lead were placed, and the brick enclosure was replaced with one made of wood. 
The dome was refurbished at the time of al-Nasir Hasan ibn Muhammad Qalawun, then the leaden plates slipped, but they were fixed and refurbished at the time of al-Ashraf Sha’ban ibn Husayn ibn Muhammad in 765 AH. It fell into disrepair and was renovated at the time of Sultan Qayit Bey in 881 AH. 
The chamber and dome were burned in the fire that swept through the Prophet’s mosque in 886 AH. During the reign of Sultan Qayit Bey the dome was rebuilt, in 887 AH, and strong pillars to support it were built in the floor of the mosque, and they were built of bricks to the correct height. After the dome had been built in the manner described above, cracks appeared in its upper part.  When it proved impossible to refurbish it,  the Sultan Qayit Bey ordered that the upper part be demolished and rebuilt strongly using white plaster. So it was built solidly in 892 AH. 
In 1253 AH, an order was issued by the Ottoman Sultan ‘Abd al-Hamid to paint the dome green. He was the first one to colour it green, and the colour has been renewed whenever necessary until the present. 
It became known as the green dome after it was painted green. It was previously known as the white dome or the fragrant dome or the blue dome.” (Fusul min Tarikh al-Madinah al-Munawwarah by ‘Ali Hafiz (p. 127, 128)
The ruling on building the Green Dome
The scholars, both in the past and in modern times, criticized the building of this dome and its being given a colour. All of that is because of what they know of shari’ah closing many doors for fear of falling into shirk. 
These scholars include the following: 

Al-San’ani (may Allah have mercy on him) said in Ta-thir al-I’tiqad: 

“If you say: A great dome has been built over the grave of the Messenger (peace and blessings of Allah be upon him), costing a great deal of money, I say: This is in fact great ignorance of the situation, because this dome was not built by him (peace and blessings of Allah be upon him) or by his Companions or by those who followed them, or by those who followed the Tabi'in, or by the scholars and imams of the ummah. Rather this dome was built over his grave (peace and blessings of Allah be upon him) on the orders of one of the later kings of Egypt, namely the Sultan Qalawun al-Salihi who is known as King Mansur, in 678 AH, and was mentioned in Tahqiq al-Nasrah bi Talkhis Ma’alim Dar al-Hijrah. These are things that were done on the orders of the state and not on the basis of shar’i evidence.”

The scholars of the Standing Committee for Issuing Fatwas were asked: 

There are those who take the building of the green dome over the Prophet’s grave in the Prophet’s Mosque as evidence that it is permissible to build domes over other graves, such as those of the righteous and others. Is this argument correct or what should our response to them be? 
They replied: 
“It is not correct to quote the fact that people built a dome over the grave of the Prophet (peace and blessings of Allah be upon him) as evidence that it is permissible to build domes over the graves of the righteous dead and others, because those people’s building a dome over his grave (peace and blessings of Allah be upon him) was haram and those who did it sinned thereby, because they went against what is proven in a report from Abu’l-Hayyaj al-Asadi who said: ‘Ali ibn Abi Talib (may Allah be pleased with him) said to me: Shall I not send you on the same mission as the Messenger of Allah (peace and blessings of Allah be upon him) sent me? Do not leave any image without erasing it or any high grave without levelling it. 
And it was narrated that Jabir (may Allah be pleased with him) said: The Prophet (peace and blessings of Allah be upon him) forbade plastering over graves, or sitting on them or building over them. Both reports were narrated by Muslim in his Sahih. So it is not correct for anyone to quote the haram action of some people as evidence that it is permissible to do similar haram actions, because it is not permissible to go against the words of the Prophet (peace and blessings of Allah be upon him) by citing the words or actions of anyone else. And because he is the one who conveyed the command from Allah, and he is the one who is to be obeyed, and we must beware of going against his commands, because Allah says (interpretation of the meaning): “And whatsoever the Messenger ((peace and blessings of Allah be upon him)) gives you, take it; and whatsoever he forbids you, abstain (from it)” [al-Hashr 59:7]. 
And there are other verses which enjoin obedience to Allah and to His Messenger. And because building up graves and erecting domes over them are means that lead to associating their occupants with Allah, and the means that lead to shirk must be blocked.” (Shaykh ‘Abd al-‘Aziz ibn Baz, Shaykh ‘Abd al-Razzaq ‘Afifi, Shaykh ‘Abd-Allah ibn Qa’ud. Fatawa al-Lajnah al-Daimah (9/83, 84) 

The scholars of the Standing Committee also said: 

“There is no proof in the fact that a dome was set up over the Prophet’s grave for those who take it as an excuse for building domes of the graves of the awliya (“saints”) and righteous people, because the building of a dome over his grave was not done on his instructions and was not done by any of his Companions (may Allah be pleased with them), or by the Tabi'in, or by any of the imams of guidance in the early generations whom the Prophet (peace and blessings of Allah be upon him) testified were good. Rather it was done by people of bid’ah (innovation). It was proven that the Prophet (peace and blessings of Allah be upon him) said: “Whoever introduces anything into this matter of ours that is not part of it will have it rejected.” And it was proven that ‘Ali (may Allah be pleased with him) said to Abu’l-Hayyaj: Shall I not send you on the same mission as the Messenger of Allah (peace and blessings of Allah be upon him) sent me? Do not leave any image without erasing it or any high grave without levelling it. Narrated by Muslim. As it is not proven that he (peace and blessings of Allah be upon him) built a dome over his grave, and it is not proven from any of the leading imams; rather what is proven shows that to be an invalid action, and no Muslim should feel any attachment to the action of innovators who built a dome over the grave of the Prophet (peace and blessings of Allah be upon him).” (Shaykh ‘Abd al-‘Aziz ibn Baz, Shaykh ‘Abd al-Razzaq ‘Afifi, Shaykh ‘Abd-Allah ibn Ghadyyan, Shaykh ‘Abd-Allah ibn Qa’ud. Fatawa al-Lajnah al-Daimah (2/264, 265) 

Shaykh Shams al-Din al-Afghani (may Allah have mercy on him) said: 

“Al-‘Allamah al-Khajandi (1379 AH) said, discussing the history of the green dome that was built over the grave of the Prophet (peace and blessings of Allah be upon him), and explaining that it is an innovation that was done by some sultans and ignorant persons who erred and made a mistake, and that it is contrary to the clear sahih hadiths and reflects ignorance of the Sunnah, and that they went to extremes and imitated the Christians who are confused and misguided: 
It should be noted that until the year 678 AH, there was no dome over the chamber which contains the grave of the Prophet (peace and blessings of Allah be upon him), rather it was built by the king al-Zahir al-Mansur Qalawun al-Salihi in that year (678 AH), when this dome was built. 
I say: He did that because he had seen in Egypt and Syria the adorned churches of the Christians, so he imitated them out of ignorance of the command and Sunnah of the Prophet (peace and blessings of Allah be upon him), as al-Walid imitated them by adorning the mosque, as was mentioned in Wafa al-Wafa. 
It should be noted that undoubtedly this action of Qalawun was contrary to the authentic hadiths of the Messenger of Allah (peace and blessings of Allah be upon him), but ignorance is a great calamity and exaggeration in love and veneration is a real disaster, and imitation of foreigners is a fatal disease. We seek refuge with Allah from ignorance and exaggeration and imitation of foreigners.” (Juhud ‘Ulama al-Hanafiyyah fi Ibtal ‘Aqaid al-Quburiyyah, 3/1660-1662) 
Why wasn’t the Green Dome demolished?
The scholars have explained the Shar’i rulings concerning the building of this dome and its obvious effects on the followers of bid’ah’ who have developed an attachment to this structure and its colour, and they praise and venerate it a great deal in their poetry and writings. Now it is up to the authorities to implement these fatwas, and this is nothing to do with the scholars.  
The reason why it is not demolished is so as to ward off fitnah and for fear that it may lead to chaos among the ordinary people and the ignorant. Unfortunately the ordinary people have only reached this level of veneration towards this dome because of the leadership of misguided scholars and imams of innovation. They are the ones who incite the ordinary people against the land of the Two Holy Sanctuaries and its ‘aqidah and its manhaj. They are very upset about many actions that are in accordance with shari’ah in our view and contrary to innovation in their view. 
Whatever the case, the shar’i ruling is quite clear, and the fact that this dome has not been demolished does not mean that it is permissible to build it or any dome over any grave, no matter what grave it is. 
Shaykh Salih al-‘Usaymi (may Allah preserve him) said: 
“The fact that this dome has remained for eight centuries does not mean that it has become permissible, and being silent about it does not indicate approval of it or that it is permissible. Rather the Muslim authorities should remove it and put it back as it was at the time of the Prophet (peace and blessings of Allah be upon him). They should remove the dome and the adornments and engravings that are found in the mosques, above all the Prophet’s Mosque, so long as that will not lead to an even greater fitnah. If it would lead to an even greater fitnah, then the ruler should postpone the matter until he finds an opportunity for that.” (Bida’ al-Qubur, Anwa’uha wa ahkamuha, p. 253)
And Allah knows best.