As per many legends and myths, Pondicherry was supposed to be the home to Rishi Agastya. It is believed that the ashram of sage Agastya was at the same place where Sri Aurobindo Ashram is located at present. Initially, Pondicherry was named as the Vedapuri and was one of the main centers for Vedic studies. According to some excavations at Arikamedu, few researchers guessed the place to be a port town and also there may be the rule of Roman rulers before 2000 years. Also, the place went into the hands of the Pandiyas, the Pallavas and the Muslim rulers for few years.
During the early 16th century, Pondicherry was conquered by the Portuguese and remained in power for few years. Gradually, the interference of the French and the Dutch began just because of trade affairs and they invaded the town. The French rulers completely took over its control in 1673 and later on, many minor conflicts took place between the Britishers and French rulers to capture Pondicherry. But finally, both the parties decided to end up the struggle for Pondicherry and decided to do settlement with mutual agreement. And as per agreement, the Britishers handed over the Pondicherry to French forever but lastly in 1954, India was quite fortunate to have Pondicherry under his control.
Courtesy and Link : https://www.ftd.travel/puducherry-history