Most headaches — especially tension-type headaches — are not serious and can be managed at home with rest, fluids, and an over-the-counter pain reliever. The mainstay of treatment is acetaminophen or an NSAID (ibuprofen, naproxen, or aspirin); recurring or severe headaches such as migraine may need prescription medicines from a doctor.
Available without a prescription — follow each label.
Tylenol Analgesic (non-opioid pain reliever) | A good first choice for an ordinary tension headache, and often gentler on the stomach than NSAIDs. Do not exceed the dose on the label (commonly 3,000–4,000 mg in 24 hours) and avoid taking it with other acetaminophen-containing products or heavy alcohol use, as too much can cause liver damage. |
Advil, Motrin NSAID (nonsteroidal anti-inflammatory drug) | Effective for tension headaches and migraine. Take with food to reduce stomach upset; can irritate the stomach or cause bleeding, so use with caution if you have ulcers, kidney problems, or take blood thinners. |
Aleve NSAID (nonsteroidal anti-inflammatory drug) | A longer-acting NSAID, useful when you want pain relief that lasts. Same stomach and bleeding cautions as ibuprofen — take with food and avoid if you have stomach ulcers or are on blood thinners without checking with a clinician. |
Bayer NSAID / salicylate | Can relieve headache pain and is sometimes combined with acetaminophen and caffeine in headache products. Not for children or teens under 16 (risk of Reye's syndrome) and can irritate the stomach or increase bleeding. |
A doctor may prescribe these — not for self-treatment.
Imitrex Triptan | For migraine specifically, a doctor may prescribe a triptan to stop an attack once it starts; it comes as tablets, a nasal spray, or an injection. It is not for ordinary tension headaches and is taken only under a clinician's direction. |
rimegepant Nurtec ODT CGRP antagonist (gepant) | A doctor may prescribe a newer CGRP-blocking medicine to treat — and in some cases prevent — migraine attacks when triptans aren't suitable or effective. |
amitriptyline Elavil Tricyclic antidepressant (used for headache prevention) | For frequent tension-type headaches or migraine, a doctor may prescribe a low dose of amitriptyline as a daily preventive; it can take several weeks to months to work and is not a quick fix for an acute headache. |
propranolol Inderal Beta blocker (migraine preventive) | For people with frequent migraines, a doctor may prescribe a daily preventive such as a beta blocker, an anti-seizure medicine like topiramate, or an anti-CGRP medicine to reduce how often attacks happen. |
For a typical occasional headache, start with a single over-the-counter pain reliever taken early, when the pain first begins — acetaminophen if you want to avoid stomach irritation, or an NSAID like ibuprofen or naproxen if your headache responds better to them. Rest, water, and reducing screen time, caffeine, or stress often help as much as the medicine. The single most important caution: do not use OTC painkillers more than about 2 to 3 days a week on a regular basis, because frequent use can trigger "medication-overuse" (rebound) headaches that make the problem worse. If a headache is clearly a migraine (throbbing, one-sided, with nausea or light sensitivity) and OTC options don't control it, that's a reason to see a doctor about prescription triptans or gepants rather than escalating OTC doses on your own.
Seek emergency care (call 911) for any "thunderclap" headache that comes on suddenly and is the worst of your life; a headache with fever and a stiff neck, confusion, drowsiness, seizures, or a rash (possible meningitis); new trouble speaking, weakness or numbness on one side, or vision loss; or a severe headache after a head injury. Make a prompt or urgent appointment if headaches happen several times a week, are getting steadily worse, wake you from sleep or are worse when lying down, start after age 50, change in their usual pattern, or no longer respond to medicines that used to work — or if you find yourself needing pain relievers more than 2 to 3 days a week. Pregnant or recently pregnant people with a new severe headache, and anyone with headache plus jaw pain, scalp tenderness, or vision changes, should be checked without delay.
General reference, not medical advice, and not a substitute for your doctor or pharmacist. The right choice depends on your symptoms, health conditions, age, and other medicines — always read each label and confirm before taking anything.