The best remedy for a headache depends on what type you’re dealing with, but for most people, an over-the-counter pain reliever like ibuprofen or acetaminophen, combined with water and rest, will resolve the pain within an hour or two. If headaches keep coming back, the fix often involves changes to hydration, diet, sleep, or stress rather than more medication.
Identify Your Headache Type First
Not all headaches respond to the same treatment, so knowing what you’re dealing with helps you pick the right approach. The vast majority of headaches fall into one of three categories.
Tension-type headaches are the most common. The pain is mild to moderate and feels like steady pressure across the face, head, or neck, often described as a belt tightening around the skull. You’ll feel it on both sides of the head, and it won’t get worse when you walk or climb stairs. These can last anywhere from 30 minutes to seven days. You might notice sensitivity to light or sound, but not both at the same time, and there’s no nausea.
Migraines are more intense: moderate to severe throbbing pain, usually on one side of the head. They often come with nausea, sensitivity to both light and sound, and sometimes visual disturbances before the pain starts. Physical activity makes them worse.
Cluster headaches are rarer but far more severe. The pain is sudden and extreme, typically behind or around one eye. It peaks within five to ten minutes and can last up to three hours. The eye on the affected side may turn red and teary, and the nose may swell or run. These attacks come in clusters, striking anywhere from every other day to eight times daily over a period of weeks.
Over-the-Counter Pain Relievers
For a standard tension headache or a mild migraine, ibuprofen and acetaminophen are both effective. Both work roughly three to four times better than placebo at reducing pain within the first hour. At the two-hour mark, ibuprofen tends to pull ahead. One clinical comparison found ibuprofen was about twice as likely as acetaminophen to fully stop a migraine within two hours.
Aspirin is another solid option. Many people combine it with caffeine, which speeds up absorption of the pain reliever and increases its strength. That’s why caffeine shows up as an ingredient in many headache-specific products. If you already drink coffee, a cup alongside your pain reliever can genuinely help. Just be aware that regular caffeine use creates its own headache risk (more on that below).
The key rule with any of these medications: don’t use them too often. Taking simple painkillers more than 15 days a month raises your risk of developing medication overuse headaches, where the very pills meant to stop your pain start causing it. For combination products (those mixing a pain reliever with caffeine, for instance), the threshold is even lower: keep use under 10 days per month. A good target is fewer than 14 days of any painkiller use per month.
Hydration Makes a Real Difference
Dehydration is one of the most overlooked headache triggers, and drinking more water is one of the simplest fixes. Research on migraine sufferers found that those who drank more water had significantly lower pain severity, shorter headache duration, and fewer headaches overall. Drinking at least 1.5 liters of water per day (about six glasses) has been linked to improved quality of life in people prone to headaches. One case study found that increasing water intake cut a migraine patient’s headaches roughly in half.
If you feel a headache starting, drink a full glass of water immediately. For prevention, steady intake throughout the day works better than catching up later.
Caffeine: Help and Harm
Caffeine has a genuine pain-relieving effect. It narrows blood vessels around the brain and boosts how well pain medications work. That makes it useful as an occasional headache tool. The problem starts when you drink caffeine every day. Your body adapts to the narrowed blood vessels, and when you skip a cup or cut back, those vessels widen again. The increased blood flow puts pressure on surrounding nerves, triggering a withdrawal headache that can last up to two weeks.
If you suspect your headaches are tied to caffeine, tapering down gradually is easier on your body than stopping cold.
Foods That Can Trigger Headaches
Certain compounds in food are well-established headache triggers. Tyramine, sulfites, and nitrates are the main culprits, and they concentrate in foods that are aged, fermented, cured, or heavily processed.
- Aged cheeses are among the worst offenders. The older the cheese, the higher the tyramine content. This extends to cheese-heavy foods like pizza.
- Processed meats like hot dogs, salami, pepperoni, bacon, beef jerky, and deli meats preserved with nitrites or nitrates.
- Fermented dairy including yogurt, sour cream, and buttermilk.
- Certain fruits like bananas, dried fruits (raisins contain both tyramine and sulfites), avocados, figs, and overripe fruit of any kind.
- Onions, sauerkraut, and certain beans including broad, lima, fava, and lentils.
- Soy products like miso, tempeh, and soy sauce (which often contains MSG).
- Fresh yeast-risen baked goods less than a day old, particularly sourdough, bagels, and soft pretzels.
If you get frequent headaches with no clear cause, an elimination diet that removes these foods for a few weeks can help you identify personal triggers. Add them back one at a time and track what happens.
Non-Drug Approaches That Work
For tension headaches especially, physical strategies can be as effective as pills. Applying a cold pack to your forehead or temples for 15 minutes constricts blood vessels and numbs the area. A warm compress or heating pad on the neck and shoulders can relieve the muscle tension driving the pain. Some people alternate between the two.
Biofeedback, a technique where you learn to control physical stress responses using real-time body data, has strong evidence behind it. Meta-analyses show it produces about a 40% improvement in migraine frequency, and those benefits hold for well over a year after treatment ends. It typically takes several sessions to learn, but the skills stay with you.
Regular aerobic exercise, consistent sleep schedules, and stress management all reduce headache frequency over time. These aren’t quick fixes for a headache happening right now, but they’re often the difference between getting headaches weekly and getting them rarely.
Supplements for Prevention
Three supplements have enough evidence to be recommended by headache specialists for people who get frequent migraines. The American Headache Society supports all three at specific daily doses:
- Magnesium oxide: 400 to 500 milligrams per day
- Riboflavin (vitamin B2): 400 milligrams per day
- CoQ10: 300 milligrams per day, shown to reduce migraine frequency in adults
These are preventive, not acute treatments. They take weeks of consistent daily use before you’ll notice a difference, and they work best for people averaging four or more headache days per month.
Warning Signs That Need Immediate Attention
Most headaches are harmless, but certain features point to something more serious. Get evaluated urgently if your headache comes on suddenly at maximum intensity (sometimes called a thunderclap headache), as this can signal a vascular emergency like an aneurysm. Other red flags include headache with fever, night sweats, or unexplained weight loss; new weakness or numbness in an arm or leg; vision changes that aren’t part of your usual pattern; headaches that are clearly getting worse over weeks; and pain that changes significantly when you shift positions, cough, or strain.
A headache during or just after pregnancy that’s new for you also warrants evaluation, as it can indicate vascular or hormonal complications. The general rule: if the headache feels fundamentally different from anything you’ve experienced before, treat that as meaningful information.