DC outputs can use diodes, I usually size to device coil draw, you can also use a zenier diode, clamp at level 50% above operating voltage.
Ac outputs need an RC device, Allen Bradley makes them for their contactors, as do other manufacturers, have also found RC devices for relay protection from Newark Electronics.