Later the centre was rebuilt in a more secure position, in the Salina. This medieval city grew until it was provided with three fortified entrances, a Palaces of Priors, seven churches and a castle (Rocca) which, according to the legend, was built by Emperor Frederick Barbarossa. The name also changed from Ficocle to Cervia, probably referring to the Acervi, great amounts of salt left in the local evaporation pods. After a long series of events, it became part of the Papal States.
As the time passed, the salt pod turned into a marsh, and on November 9, 1697 Pope Innocent XII ordered it to be rebuilt in a safer location. The new city had huge silos for storage of salt, containing up to 13,000 tons.
Until 1947 it was the seat of the diocese of Cervia. This was the diocese of the famous thirteenth century bishop and surgeon Theodoric Borgognoni.
Cervia is also mentioned in Dante's Divine Comedy:
Ravenna sta come stata è molt'anni:
l'aguglia da Polenta la si cova,
sì che Cervia ricuopra co' suoi vanni.
Ravenna is as it has been for many years
the da Polenta eagle makes its nest there,
Enclosing Cervia under its wings.
(Inferno, Canto XXVII, lines 40-42)