We have been down this road many, many times before.....
WD-40 is a penetrating oil.
An O-ring or X-ring chain is lubed internally from the factory. Each "hinge" in the chain consists of a hollow bushing with a pin going thru it, lubed with grease and sealed with an O/X ring on each side to keep contaminants out and the grease in. Lubing the outside of the chain serves 3 purposes.
It keeps the O/X rings pliable so they can do their job.
It helps prevent the chain from rusting.
It provides a questionable lubrication to the outside of the bushings and the sprocket teeth.
WD-40 has the potential to penetrate past the seals and dilute/displace the grease inside each link. That is not a good thing, that is the opposite of what we are trying to accomplish.
Any chain-specific lube that you apply externally will have positive and negative results. If it is too thin, it will fling off and not provide much protection unless it is reapplied constantly. If it is too thick, it will attract and hold all the dirt and brake dust and wayward animal and insect parts and become a gooey mess that will act like a grinding compound unless it is cleaned off and reapplied frequently.
So choose your poison, but clean and maintain accordingly.
I'd stay away from WD-40 for this application....
