During the rule of the Chinese people, Hanoi used to be called Tong Binh District in history books from the years 454-456 under the Southern and Northern Dynasty of China.
Later, Hanoi was renamed Dai La. Dai La, or Dai La citadel, formerly called the outer citadel surrounding the capital. According to ancient architecture, the capital often has three citadels including the Forbidden City where the king and royal family live, the Royal Citadel in the middle and the outer citadel Dai La.
Long Do (navel of a dragon) is also a name of Hanoi, but not the official name. This name appeared from the time of Cao Bien. Legend has it that, in the year 866, when Cao Bien built Dai La, he saw a god claiming to be Long Do. Hence, the history documents often called Thang Long as Long Do.
When Vietnam gained independence, Hanoi became the capital at the time of Dai Viet from the 11th century with the name of Thang Long (which means "flying dragon"), after Ly Cong Uan claimed to move the capital in 1010. Thang Long was the capital until 1397 when the capital was moved to Thanh Hoa (meaning Tay Do). Thang Long then called Dong Do.
In 1408, Dai Ngu nation of father and son Ho was invaded by the Ming army and Dong Do was renamed as Dong Quan.
In 1428, after Le Loi's army liberated the country, it was renamed Dong Kinh – the Europeans transliterated into Tonkin.
Under Tay Son Dynasty, as the capital is located in Phu Xuan, the capital was named Bac Thanh.
In 1802, when the Nguyen Dynasty moved the new capital to Hue, it was renamed, Thang Long, but this time, the word "Long" represents prosperity, rather than the dragon, for the reason that the dragon is a symbol of the king, and the king is not here, it is not allowed to use the word "Long" as a meaning of "dragon"
Then King Gia Long ordered to tear down the old citadel because the capital was not in Thang Long and Thang Long citadel was too wide.
In 1831, King Minh Mang founded Ha Noi province. When Vietnam interacted with the West, Sino-Vietnamese name of Hanoi was Dong Kinh, written into Tonkin and Europeans were commonly used. In 1873, the French began to strike Hanoi and 10 years later, they dominated the entire nation. Since 1887, Hanoi became the capital of Indochina belonging to French.
In 1940, the city was invaded by Japanese fascists and in 1945 Hanoi was liberated and was the place located the department of the Government of the Democratic Republic of Vietnam. From 1946 to 1954, Hanoi was in a fierce battleground between Vietnamese army and the French military. After being liberated on October 10, 1954, Hanoi became the capital of the Democratic Republic of Vietnam.
During the Vietnam War, the traffic construction of Hanoi such as bridges and railway were destroyed by bombs but immediately corrected. During this time, Hanoi was hailed as "Capital of human dignity". Hanoi became the capital of the whole Vietnam after the unification of the north and south after July 2, 1976.
Hanoi has many other informal names, appearing mainly in poetry and folklore: Trang An or Truong An (taken from the name of the Chinese capital under Han and Tang dynasties); Phung Thanh or Phuong Thanh; Long Thanh, Long Bien, Ke Cho (in the folk); Thuong Kinh, Kinh Ky, Ha Thanh, Hoang Dieu, shortly after the August Revolution - 1945, sometimes in the newspapers of Vietnam used this name to refer to Hanoi.