1. That is the postcode (CAP, short for codice di avviamento postale) used by the Comune di Bologna for its town hall at Piazza Maggiore 6, by the Basilica di San Petronio, and by the Bologna Welcome tourist office at Piazza Maggiore 1/e.

You will also see 40121 and 40125 attached to the square online. Both are real Bologna postcodes, but they belong to neighboring parts of the center: 40121 to streets north of the square such as Via dei Mille and Via Riva di Reno, and 40125 to the area east along Strada Maggiore. The historic center is split between several codes, so a shop a couple of streets away can legitimately use a different one, and listings sites copy each other’s mistakes.

For anything on the square itself, use 40124. The province abbreviation is BO, so a full address reads like this: Piazza Maggiore 6, 40124 Bologna BO, Italy.