WD-40 is fine on anything metal, but it will burn off the exhaust. You just have to keep reapplying it. Or, take a rag and some engine oil and put on the exhaust. It burns off too, but leaves what appears to be a carbon coating, like on a bar-b-que grille. And the more you put on, the more it builds up. Should protect the metal on the back and bottom of the exhaust where you can't see it, might not look too good out in the open.
2002 Vulcan 750 (engine out, slowly being disassembled) 2013 Royal Enfield B5
2001 XT225, 2009 Genuine Stella
2012 Zuma 125, 1980 Puch moped