Is WD40 Bad For Bikes?

Can I use WD 40 to clean my bike chain?

.

What is the best lubricant for a bike chain?