Kodungallur is a municipality in the Thrissur district of Kerala, India. Kodungallur is 29 km northwest of Kochi and 38 km southwest of Thrissur, by National Highway 66.Until recently the location of one of the greatest seaports of ancient eastern World, Muziris (ca. 100 BCE-1341 CE), was usually identified in Kodungallur. However, some recent archaeological studies and evidences from excavations suggest that the location of the disappeared port could have been at Pattanam, a small town 9 km south of Kodungallur. Kodungallur was an integral part of Mahodayapuram, the capital city of the kingdom of Second Cheras. In the post-Chera period, the area was a feudal principality ruled by a royal family, Kodungallur Kovilakam, subordinated at early stages to the kingdom of Zamorin, and on later stages to the kingdom of Kochi, till the independence of India.
Till 1980s, it was generally believed that Kodungallur and Muziris are synonymous in the historical point of view. In 1983, a large hoard of Roman coins was excavated at a site in a small town, called Pattanam, about six miles from Kodungallur.
The glory of Kodungallur, as a global trade centre, is believed to be destroyed by natural calamities.According to one view it was heavy floods in the river Periyar that destroyed the city in 1341, while others point out to an earth quake in this regard. The floods further split the left branch of the river into two, just before the city of Aluva. The flood silted the right branch (known as River Changala) and the natural harbour at the mouth of the river to make it poorly navigable for large ships. The misfortune of Kodungallur helped other major ports of Malabar coast, such as the one at Kochi, to rose to the prominence.
During Portuguese period, Kodungallur was a tributary state in the kingdom of Zamorin, the most powerful of independent rulers of Malabar region. Since the location of Kodungallur sandwiched between the kingdom of Zamorin and the kingdom of Kochi, it was often a matter of dispute for both the kings and sometimes the chieftain of Kodungallur switched the allegiance.