The royal enclosure was first built during the Lý dynasty (1010) and subsequently expanded by the Trần, Lê and finally the Nguyễn dynasty. It remained the seat of the Vietnamese court until 1810, when the Nguyễn dynasty chose to move the capital to Huế. The ruins roughly coincide with the Hanoi Citadel today.
The royal palaces and most of the structures in Thăng Long were in varying states of disrepair by the late 19th century with the upheaval of the French conquest of Hanoi. By the 20th century many of the remaining structures were torn down. Only in the 21st century are the ruin foundations of Thăng Long Imperial City systematically excavated.
The central sector of the imperial citadel was listed in UNESCO's World Heritage Site on July 31, 2010 at its session in Brazil, as "The Central Sector of the Imperial Citadel of Thăng Long – Hanoi".
The royal palaces and edifices were largely destroyed in the late 19th century. The few remaining structures within the royal compound are the Doan Mon gate, marking the southern entrance to the royal palace, the Flag Tower, the steps of Kinh Thiên Palace and the Hậu Lâu (Princess' Palace).
Remains of the Imperial City were discovered on the site of the former Ba Đình Hall when the structure was torn down in 2008 to make way for a new parliament building. Various archaeological remains unearthed were brought to the National Museum to be exhibited. Thus far only a small fraction of Thăng Long has been excavated.
According to VietKings (Kyluc.vn)