The Cathode end of the diode, the end with the white band goes to the positive side of the solenoid, and the other end of the diode to the negative end of the solenoid.
Funny, I use them as if the band is at the end of the diode that current flows OUT (to GND) and it works. Note that current here is + charges.
Sparkfun says:
The positive side is called the anode, and the negative one is called the cathode. The diode circuit symbol, with the anode and cathode marked. Current through a diode can only flow from the anode to the cathode, which would explain why it's important for a diode to be connected in the correct direction.
From Wiki:
Faraday also introduced the words anion for a negatively charged ion, and cation for a positively charged one. In Faraday's nomenclature, cations were named because they were attracted to the cathode in a galvanic device and anions were named due to their attraction to the anode.
In the diode, and specifically in the so-called depletion region, there is diffusion of carriers (electrons and holes) from one region to the other. Since the Anode is positively doped, it will attract electrons from the cathode, and this will cause the formation of Anions in its side of the depletion region.
Cations (positive) go to the cathode.... hence over a century of confusion.
introduction-to-diodes-and-rectifiers
Oddly enough, the direction of the diode symbol’s “arrowhead” points against the direction of electron flow. This is because the diode symbol was invented by engineers, who predominantly use conventional flow notation in their schematics, showing current as a flow of charge from the positive (+) side of the voltage source to the negative (-). This convention holds true for all semiconductor symbols possessing “arrowheads:” the arrow points in the permitted direction of conventional flow, and against the permitted direction of electron flow.