Seems like just about everybody has a can of WD-40 out in the garage. Great for freeing sticky metal parts and rusted nuts and bolts, I remember seeing my dad spray it as a lubricant on my bike chain and other things back when I was a kid.
Turns out however, that strategy is not really the right approach. WD-40 is a solvent, which is what makes it good for busting through rust and freeing up stuck parts. That is not the same as being a lubricant, however. It dries out in a short time after being sprayed on the bike chain and doesn't really help keep the moving pieces working smoothly together.So if you want to extend the life of your chain and enable maximum performance when you ride, don't use WD-40. A true lubricant such as Park Tool synthetic blend chain lube or Pro Link chain lube is going to be what you want to use. Your local bike shop will have recommendations too about other brands they like and use and almost certainly have a supply there they can sell you.