Diodes should be installed as close as possible to the solenoid. Soldering a diode directly across the two solenoid terminals is ideal.
Use a diode with a voltage rating of at least ten times the circuit voltage and a current rating at least as big as the current flowing through the solenoid.
In practice, diodes rated at 200 Volts and 1 Amp are readily available for a few cents each and are fine for most applications.
Diodes typically have a stripe on one end of the case.
On equipment with negative grounds, the endwith the stripe should be installed on the most positive side of the solenoid.
This is usually the side that has the wire from the handle switch. Diodes are not suitable for AC voltage applications.
“Keyword”
“what does a diode do on a solenoid”