- For ecclesiastical history, see Roman Catholic Diocese of Alghero-Bosa
The area of today's Alghero has been settled since pre-historic times. The Ozieri culture was present here in the 4th millennium BC (Necropolis of Anghelu Ruju), while the Nuraghe civilization settled in the area around 1,500 BC.
The Phoenicians had arrived by the 8th century BC and the metalworking town of Sant'Imbenia, with a mixed Phoenician and Nuragic population, engaged in trade with the Etruscans on the Italian mainland.
Due to its strategic position on the Mediterranean Sea, Alghero had been developed into a fortified port town by 1102, built by the Genoese Doria family. The Dorias ruled Alghero for centuries, apart from a brief period under the rule of Pisa between 1283–84. Alghero's population later grew because of the arrival of Catalan colonists. In the early 16th century Alghero received papal recognition as a bishopric and the status of King's City (ciutat de l'Alguer) and developed economically.
Historically, the city was founded in the early twelfth century between 1102 and 1112, when the noble Doria family of Genoa was allowed to build the first historical nucleus into an empty section of the coast of the parish of Nulauro in Judicature of Torres (Sassari).
For two centuries remained in the orbit of the Maritime Republics, first and foremost the Genoese apart from 1283-1284 when the Pisans were able to control it for a year. It is plausible that at this time the town shared, given its commercial and multi-ethnic nature, a language similar to the nascent Sassarese.
The village was conquered by force by the Crown of Aragon, at the behest of Peter IV d'Aragona, who later actively promoted colonisation of the town and the surrounding area, sending numerous families from different counties and provinces of the then Crown of Aragon, including Valencia, Majorca, Catalonia and Aragon. These were granted enticing privileges, and in fact replaced the original population some of whom were sent to the Iberian Peninsula and Majorca as slaves. The dialects these families spoke in Alghero, were all very similar and derived from the same linguistic family. Over time it settled on its current form of Catalan, despite the subsequent decline of the Crown of Aragon. Alghero today is struggling to retain the use of Catalan, which is a linguistic island and only 10-15% of its inhabitants speak it in its Alghero variant. The language is recognized by both the Italian Republic and Sardinia as a minority language. Nowadays it is poorly spoken by young people. The city is trying for some time to protect this dialect, through education programs and official use within the local authority. The citizens currently residing in Alghero however, are mostly from the surrounding territories and prefer either the Italian language or Sardinian and Sassarese. Alghero still maintains a small representation at the Generalitat de Catalunya (the autonomous government of Catalonia), without actually having any institutional power in the territory apart from providing assistance to the preservation of Catalan culture.
The city, one of the principal of Sardinia and the fifth most populated region, is one of the gateways to the Island thanks to the nearby airport. It is the capital of the Riviera del Corallo, whose name derives from the fact that its waters provide an abundant supply of precious red coral of the finest quality. Historically the processing and sale of the material has been of great importance to the economy and a branch of coral is inserted in the emblem of the city.
The Aragonese were followed by the Spanish Habsburgs, who ruled until 1702 and continued expanding the town.
In 1720 Alghero, along with the rest of Sardinia, was handed over to the Piedmont-based House of Savoy. In 1821 a famine led to a revolt by the population, which was bloodily suppressed. At the end of the same century Alghero was de-militarised.
During the Fascist era, part of the surrounding marshes were reclaimed and the suburbs of Fertilia and S.M. La Palma were founded. During World War II (1943) Alghero was bombed, and its historical centre suffered heavy damage. The presence of malaria in the countryside was finally overcome in the 1950s.
Since then, Alghero has become a popular tourist resort.