The building of the cathedral, to replace an older one, was authorised by a papal bull of Pope Urban VI in 1378. The works started in 1385 and were paid for by the generosity of Andrea Malatesta, the lord of the city. The building was completed around the year 1405. The construction, in Romanesque-Gothic style, is attributed to the architect Undervaldo (probably Swiss).
The campanile (bell tower) was built between 1443 and 1457 to designs by the Maso di Pietro and funded by Bishop Antonio Malatesta da Fossombrone (bishop of Cesena from 1435 to 1475).
The same Bishop Malatesta was responsible for the building of the Bishop's Palace adjoining the cathedral, which was completed by his successor Giovanni Venturelli (1475–1486).
After the radical rebuilding of the 1960s the only surviving original part of the structure is what remains of the door on the eastern side. Also dating from the Renaissance period is the Chapel of Saint Tobias next to the cathedral, now in use as the cathedral museum. However, the old hospital of the same name which gave assistance to pilgrims no longer exists.
The façade of the cathedral was completed only at the end of the 15th century with works attributed to the Venetian architect Mauro Coducci (1440–1504).
Inside the cathedral a small painting on a copper plate by the ManneristLivio Agresti depicting Saint John has been returned.
In the Cappella della Madonna del Popolo ("Chapel of the Madonna of the People") are frescoes by Corrado Giaquinto dating from 1750, and the painting was personally crowned by the Pope Pius VI on 3 June 1782, the first occasion in papal history.