The history of the small medieval town of Castelsardo has origins that are distant in time. The territory in which it is situated is rich in Nuraghe and Domus de Janas, amongst which that in a rock in the form of an elephant.

Castelsardo, with its 5000 inhabitants, is situated on a large rock outcrop in the sea in the Gulf of Asinara.

It was founded by the Doria family in 1102 with the name of Castel Genovese.
In 1438 it was conquered by the Aragonese who partially dismantled the fortifications and changed the name to Castel Aragonese. Only in 1769, when it passed to the Savoy family, was the town called Castelsardo.