Riolo is a founded town, and the date is known. In the thirteen hundreds the chief centre of the middle Senio valley was the castrum of Laderchio, on which the towers of Ossano, Voltrignano, Arbustedo, Chiesanuova and Limisano depended; in 1376 the inhabitants of those places asked Bologna for protection, Bologna being the rival of both Imola and Faenza, and promised it obedience. The Bolognese senate then ordered them all to move to a new site — the largest number of families came from Laderchio and from Ossano — and had the rocca begun to a design by Masino della Colla; in those same years Bologna was founding Castel Bolognese on the via Emilia. The place chosen was naturally defended by escarpments on two sides, and the houses were built up against the one facing the Senio, while the rocca was set on the open side. The layout is the one typical of medieval founded towns: a few parallel streets and one crossing them. In 1478 Girolamo Riario, lord of Imola, took Riolo, and it was under him and under his wife Caterina Sforza that the rocca took the shape it has today.
Then the fortress stopped being of use and the town reinvented itself with water. Between the sixteen and seventeen hundreds two corners of the walls collapsed, and the comune asked Imola for help; Imola did not answer, and the people of Riolo rebuilt the wall at their own expense. Meanwhile the baths had been discovered, rich in hydrogen sulphide: in 1811 the visitors were more than five hundred, and the citizens put them up, turning themselves into landlords for the occasion. By 1865 five springs were working along the Rio Vecchio — two of salt water, two sulphurous and one ferruginous — and the users were four thousand a year, from the twenty-fifth of June to the seventeenth of September. The comune bought all the springs, channelled them into a single place and gave the design to the Faenza architect Antonio Zannoni, who built the thermal buildings in a solemn Corinthian style: the Terme were inaugurated on the twenty-fourth of July of 1877. The water of Riolo was bottled and sold in various Italian cities, and the proceeds paid for the roads. In 1892 the town hall moved inside the rocca. And the name followed the water: in 1914 the town became Riolo dei Bagni, and in 1957 Riolo Terme.