The invention is directed to topical formulations and methods of treating a migraines and/or cluster headaches, muscle sprains, muscle spasms, spasticity, tension headaches, tension related migraines and related conditions associated with muscle tension and pain with a therapeutically effective amount of an ergot alkaloid, skeletal muscle relaxant, serotonin agonist, combinations thereof, pharmaceutically acceptable salt thereof, prodrugs thereof or derivative thereof.