In the 7th century CE, Xuanzang (Hiuen Tsang), the Chinese monk, recorded spotting many Hindu temples in Ayodhya. In the epic Ramayana, the city of Ayodhya is cited as the birthplace of Lord Sri Rama, a Hindu deity who was worshipped as Lord Vishnu's seventh incarnation. Ayodhya became a famous pilgrimage destination in the 1400s when Ramananda, the Hindu mystic, established a devotional sect of Rama.
The Thai kingdom and city of Ayutthaya, and the Indonesian sultanate of Yogyakarta, were named after Ayodhya, reflecting the common Southeast Asian practice of adopting place names from Hindu kingdoms.
United Provinces of Agra and Oudh, showing 'Ajodhia', 1903 map
The Atharva Veda called Ayodhya "a city built by gods and being as prosperous as paradise itself".
According to an 11th century Korean chronicle the Samguk Yusa, the wife of King Suro of the ancient Korean kingdom of Geumgwan Gaya was a princess who travelled by boat from a faraway land called Ayuta to Korea in 48 CE. It is commonly thought that Ayodhya is the foreign land referred to in the Korean chronicles, but some scholars believe that the foreign land may have been Ayutthaya of Thailand. The Koreans know the princess as Heo Hwang-ok, who was the first queen of Geumgwan Gaya and is considered an ancestor by several Korean lineages.
Ayodhya, like other Indian cities, was the victim of pillage and sacking during the Ghaznavi raids and Ghori invasions. Hindu temples were allegedly looted or destroyed. The cultural fabric was totally destroyed. With Muslim rulers established around the city under Mohammed of Ghor, it lost its strategic and economic importance to Lucknow and Kanpur.Ayodhya today is a small, rustic city with ancient Hindu architecture predominating, and with some Mughal influence. Its population is mostly Hindu with a minority of Muslims, Jains and Buddhists. However, its history and heritage hold an unequivocal importance for Hindus.
The 16th century witnessed a shift in power with Ayodhya coming under the rule of the Mughal Empire. Ayodhya was annexed in 1856 by the British rulers. Between 1857 and 1859, this place was one of the main centers where the sparks of the first war of Indian Independence originated. These sparks later led to a nationwide revolt of the Indian soldiers in opposition to the British East India Company that began in Calcutta.
Hindu tradition and scriptures state that, this place and other places in Ayodhya were discovered, excavated and rebuilt by the king Vikramaaditya as it was during the tenure of Lord Rama. It is said that Lord Rama appeared in king Vikramaditya's dreams and showed him the very powerful and prosperous city of Ayodhya with all its glory and richness during his times. He then instructed the king to rebuild the city of Ayodhya as it was. King Vikramaditya expressed his inability to rebuild such a magnificent city again with all its riches but promised to rebuild this city as per his abilities. He then, as per the lords instructions, carried out large scale archeological excavations, at different locations in Ayodhya and reinstalled the temples and other places of importance in Ayodhya. The city of Ayodhya holds immense historical and spiritual importance.