Kannauj, is a city, administrative headquarters and a municipal board or Nagar Palika Parishad in Kannauj district in the Indian state of Uttar Pradesh. The city's name is a modern form of the classical name Kanyakubja. It was also known as Mahodaya during the time of Gurjara-Pratihara Emperor Mihira Bhoja, around the 9th century.
In Classical India, it served as the center of imperial Indian dynasties. The earliest of these was the Maukhari dynasty, and later, Emperor Harsha of the Vardhana dynasty. Between the 7th and 11th century, Kannauj became the center of the Tripartite struggle that lasted for more than two centuries between the Pala Empire, Rashtrakuta Empire, and Gurjara-Pratihara Empire. The city later came under the Gahadavala dynasty, andunder the rule of Govindachandra, the city reached "unprecedented glory".
Kannauj itself has more than 200 perfume distilleries and is a market center for tobacco, Ittar (perfume), and rose water. It has given its name to a distinct dialect of the Hindustani known as Kanauji, which has two different codes or registers.
Archaeological discoveries show that Kannauj was inhabited by the Painted Grey Ware and Northern Black Polished Ware cultures, ca. 1200-600 BCE and ca. 700-200 BCE, respectively. Under the name of Kanyakubja, it is mentioned as a well-known town in the Hindu Epics, the Mahabharata and the Ramayana, and by the grammarian Patanjali (ca. 150 BCE). The early Buddhist literature mentions Kannauj as Kannakujja, and refers to its location on the trade route from Mathura to Varanasi and Rajgir.
Kannauj may have been known to the Greco-Roman civilization under the name of Kanagora or Kanogiza, which appears in Geography by Ptolemy (ca. 140 CE), but this identification is not confirmed. It was also visited by the Chinese Buddhist travellers Faxian and Xuanzang in the fifth and seventh centuries CE, respectively.
Kannauj formed part of the Gupta Empire. During the decline of the Gupta Empire in the 6th century, the Maukhari dynasty of Kannauj - who had served as vassal rulers under the Guptas - took advantage of the weakening of central authority, broke away and established control over large areas of northern India.
Under the Maukharis, Kannauj continued to grow in importance and prosperity. It became the greatest city of Northern India under Emperor Harsha (r. 606 to 647 CE) of the Vardhana dynasty, who conquered it and made it his capital. Chinese pilgrim Xuanzang visited India during the reign of Harsha, and described Kannauj as a large, prosperous city with many Buddhist monasteries. Harsha died with no heir, resulting in a power vacuum until Maharaja Yashovarman seized power as the ruler of Kannauj.
Kannauj became a focal point for the three powerful dynasty's namely the Gurjara Pratiharas, Palas and Rashtrakutas, between the 8th and 10th centuries. The conflict between the three dynasties has been referred to as the Tripartite struggle by many historians.
There were initial struggles but ultimately the Gurjara Pratiharas succeeded in retaining the city. The Gurjara-Pratiharas ruled Avanti (based at Ujjain), which was bounded to the South by the Rashtrakuta Empire, and the Pala Empire to the East. The Tripartite struggle began with the defeat of Indrayudh at the hands of Gurjara-Pratihara ruler Vatsaraja. The Pala ruler Dharampala was also keen to establish his authority at Kannauj, giving rise to a struggle between Vatsaraja and Dharampala. Dharampala was however defeated. Taking advantage of the chaos, the Rastrakuta ruler Dhruva surged northwards, defeated Vatsaraja, and took Kannauj for himself, completing the furthest northern expansion by a South Indian ruler.
When the Rashtrakuta ruler advanced back to the south, Dharampala was left in control of Kannauj for some time. The struggle between the two northern dynasties continued: the Pala Chakrayudh was defeated by the Pratihara Nagabhata II, and Kannauj was again occupied by the Gurjara Pratiharas. Dharampala tried to take control of Kannauj but was defeated badly at Moongher by the Gurjara Pratiharas. However, Nagabhata II was in turn soon defeated by the Rashtrakuta Govinda III, who had initiated a second northern surge. An inscription states that Chakrayudh and Dharampala invited Govinda III to war against the Gurjara Pratiharas, but Dharampala and Chakrayudh both submitted to the Govinda III, in order to win his sympathy. After this defeat, Pratihara power degenerated for some time. After the death of Dharampala, Nagabhata II regained hold over Kannuaj and made it the capital of the Gurjara Pratihara Empire. During this period, the Rashtrakutas were facing some internal conflicts, and so they, as well as the Palas, did not contest this. Thus Gurjara Pratiharas became the greatest power in Northern India after occupying Kannauj.
Famous Pir-e-Kamil, Hazrat Pir Shah Jewna Al-Naqvi Al-Bokhari was also born in Kannauj in 1493 in the reign of King Sikandar Lodi. He was a descendant of Jalaluddin Surkh-Posh Bukhari and his father Syed Sadar-ud-din Shah Kabeer Naqvi Al Bukhari was a great saint and was also among the advisors of King Sikandar Lodhi. Shah Jewna migrated to Shah Jeewna (a town named after him) now in Pakistan. His descendants still present in various parts of India including Abdullapur Meerut.
Sultan Mahmud of Ghazni captured Kanauj in 1018. Chandradeva founded the Gahadvala dynasty with its capital at Kanauj around 1090. His grandson Govindachandra "raised Kanauj to unprecedented glory." Muhammad Ghori advanced against the city, and in the Battle of Chandwar of 1193 killed Jayachandra. Alberuni has referred to "Kanoj" as the key geographical point to explain marching distances to other Indian cities  The "glory of Imperial Kanauj" ended with Iltutmish's conquest.:21,32–33
During early English rule in India, the city was spelled Cannodge by them. The Nawab Hakim Mehndi Ali Khan has been constantly associated with the developmemt of city of kannouj by the travellers and writers of the period. A ghat (Mehndighat), a Sarai (for the free stay of travellers and merchants) and various metalled roads were built by the Nawab which also bear his name.
Kannauj is located at . It has an average elevation of 139 metres (456 feet).
As of 2001 India census, Kannauj had a population of 71,530. Males constitute 53% of the population and females 47%. Kannauj has an average literacy rate of 58%, lower than the national average of 59.5%: male literacy is 64%, and female literacy is 52%. In Kannauj, 15% of the population is under 6 years of age.
Government Engineering College, Kannauj is a government engineering college located at Kannauj. It is a constituent college of Dr. A.P.J. Abdul Kalam Technical University (formerly Uttar Pradesh Technical University) in Lucknow. The college is situated at Aher, Tirwa.