Skip to main content
Headaches

How to Get Rid of a Headache: Common Tips and Tricks That May Help

Jill L. Jaimes, MDKaren Hovav, MD, FAAP
Written by Jill L. Jaimes, MD | Reviewed by Karen Hovav, MD, FAAP
Updated on December 19, 2025

Key takeaways:

  • Headaches are common. Most headaches last only a few hours and aren’t a sign of a serious medical condition. But that doesn’t mean they aren’t disruptive and painful.

  • There are many lifestyle changes and over-the-counter medications that can help you get rid of a headache — and prevent future headaches. 

  • Some nontraditional treatments, like essential oils or acupuncture, have shown promise in alleviating headache symptoms. 

Headaches are a common ailment that often come out of nowhere. And they can really disrupt your day or slow you down. But they don’t have to stop you in your tracks. While they can feel severe, most headaches aren’t a sign of anything dangerous.

The good thing is there are many treatments and remedies that can provide relief. Let’s look at some things you can try at home to help get rid of headaches — and ways to prevent them from starting in the first place.

Effective ways to get rid of headaches

When you want to get rid of a headache fast, your first thought might be to reach for medication. Before we review which medications can help, we’ll look at everyday lifestyle changes that can go a long way in treating and preventing headaches

Hydration

The right amount of water you should drink daily depends on your weight, activity, and overall health. But in general, staying well hydrated can help prevent headaches. Studies show that people who drink more fluids tend to have fewer headaches. When they do get headaches, their symptoms tend to be less severe and get better faster. 

Stress reduction 

Stress plays a big role in headaches. Here are some techniques you can try to help manage and decrease your stress level: 

  • Progressive muscle relaxation: In this technique, you tighten and then relax specific muscle groups, one at a time. This can help release muscle tension and reduce stress. 

  • Meditation: There are many ways to meditate. Most involve being in a quiet space so you can slow down and focus on your mind and body. In mindfulness, the focus is more on the present moment without judging your thoughts or feelings.

  • Breathing exercises: Sometimes simply taking slow, deep breaths helps you relax. One method is box breathing. To do this, breathe in for four counts, hold for four counts, exhale for four counts, and then hold for four counts. Repeat this method until you feel calmer.

Exercise

Research shows that regular exercise helps people with headaches. While researchers don’t agree on the best type or amount of exercise, one recent review showed that headaches often got better with exercise. Participants who exercised had fewer and less intense headaches. 

One smaller study showed that just 20 to 30 minutes of exercise, 3 times a week, greatly improved headache symptoms. Each participant could decide how hard they wanted to exercise. For example, people could choose to walk or run. Everyone who exercised reported fewer headaches.

Dietary changes

Some foods may lower your risk of headaches, while others may increase it. Foods that may help prevent headaches include: 

  • Seeds and nuts: These are rich in magnesium, which may be especially helpful for people with migraines with aura or menstrual headaches.

  • Citrus fruits: Fruits like oranges and grapefruit are packed with vitamin C. There’s some evidence that vitamin C can lower the risk of severe headaches or migraines.

  • Leafy greens: Leafy greens like spinach and kale are another great source of magnesium. 

  • Fatty fish: Fish like salmon, tuna, and mackerel have lots of omega-3 fatty acids. Getting lots of omega-3 fatty acids from your diet can lower how often headaches occur and how severe they feel. 

  • Fiber-rich foods: High-fiber foods, like whole grains, beans, lentils, vegetables, and fruit, may also lower your risk of severe headaches. 

GoodRx icon
  • Migraine vs. headache: What’s the difference? A migraine is a type of headache. Other types include cluster headaches and tension headaches. 

  • Best migraine medications: Both short-term and preventative medications are available for migraines. Learn which one might be best for you. 

  • Natural headache remedies for children: Cool compresses, rest, and relaxation might just do the trick. If those don’t work, over-the-counter medications can also help.

For some people, avoiding certain foods is key to preventing headaches. Food triggers won’t be the same for everyone. But common dietary triggers include: 

  • Cheese

  • Chocolate

  • Alcohol

  • Processed meats 

  • MSG (monosodium glutamate)

  • Gluten 

  • Artificial sweeteners

Caffeine 

Many people reach for caffeine when they have a headache. There’s caffeine in coffee, tea, soda, and energy drinks. And the data shows that consuming less than 400 mg of caffeine per day may help decrease how often headaches occur. For reference, one 8-oz cup of coffee usually has 95 mg to 165 mg of caffeine. 

But it’s important to be consistent. These studies show that people who regularly have caffeine and then suddenly miss a day may get caffeine-withdrawal headaches. And people who consume high doses of caffeine (over 400 mg a day) tend to have more migraines. 

Caffeine may help your headaches if you drink it consistently, in small to moderate amounts, around the same time each day. 

Sleep hygiene

Featuring Mark Green, MDReviewed by Sarah Gupta, MD | April 8, 2025

Sleep can have a big effect on how often you have headaches. And it’s well known that sleep apnea can affect sleep quality and cause headaches — particularly morning headaches. If you’re well rested, you’re less likely to have headaches. In one study, the researchers found that sleep quantity and quality reduced the likelihood of headaches. 

Home remedies to relieve headaches 

Simple home remedies can also help ease a headache. It may take a little trial and error to figure out what works best for you. Many people find relief with things like:

  • Cold compress

  • Warm baths

  • Head or facial massage

  • Scalp massage

  • Dimming the lights

Medications and supplements that help headaches

When lifestyle changes aren’t cutting it, there are several over-the-counter (OTC) medications and supplements that may help to treat and prevent headaches. 

OTC pain relievers and medications

The following medications can help get rid of a headache after it has started:

  • Acetaminophen (Tylenol): People often take acetaminophen for pain as well as fever. It can help with headaches on its own, but it seems to work better as a combination with caffeine and aspirin (like in Excedrin).

  • Ibuprofen (Advil): This is a common treatment for pain and fever. A standard adult dose of 400 mg may help to improve headache symptoms. But it may not fully stop a headache. 

  • Aspirin: This may be one of the oldest pain medications. Even with the discovery of other newer medications, aspirin is still an effective treatment for headaches. A recent research review showed that higher doses (about 1,000 mg) can safely relieve headache pain. Lower daily doses (81 mg or 325 mg) can be an option for preventing headaches. 

Supplements

There’s evidence to suggest the following dietary supplements can help reduce how often headaches happen and how severe they feel:

  • Magnesium: This mineral is in many foods like nuts, wheat, beans, and green vegetables. Some studies show that taking magnesium supplements every day can decrease the number of headaches that people experience. But there are also conflicting studies that show no effect. This may mean it’s only helpful in people who have low magnesium levels. 

  • Vitamin D: Several studies have shown that people with recurrent headaches tend to have lower vitamin D levels. Most of the data shows that vitamin D supplements can decrease the number of headaches people experience.

  • B vitamins: Studies show that daily supplements of B vitamins can decrease the number of headaches in people who get them often. Headaches may also be less intense and go away more quickly. 

  • Coenzyme Q: This is a nutrient with antioxidant properties. Research shows that people with migraines have lower levels of coenzyme Q. And supplementing with coenzyme Q may help reduce both the number and severity of headaches. 

Many of these studies looked at people with severe headaches or migraines. There is less evidence that looks at how well these supplements work for mild or occasional headaches. 

Alternative therapies for headaches

Many people want to treat headaches without taking a pill or supplement. There are several alternative treatments that may help improve headache symptoms. While there isn’t strong evidence to prove how well they work, these may be low-risk options to consider. 

Essential oils

People use essential oils as homeopathic remedies for various ailments. Studies show the following oils may help with migraine headaches: 

  • Lavender

  • Chamomile

  • Peppermint

  • Anise

  • Basil

  • Rose oils

Most people add a few drops of essential oil to their upper lip or temple area.

Yoga

Multiple studies have looked at whether yoga can help treat headaches. When results from multiple different studies were combined, yoga was shown to improve headache frequency, duration, and severity. But it’s worth noting they only saw this effect with tension-type headaches, not migraines. 

Acupuncture

Acupuncture is a traditional Chinese method of balancing energy within your body. A trained specialist inserts very thin needles into specific spots on your body. It’s not clear why it’s an effective treatment for a wide variety of conditions. But a number of studies have demonstrated that acupuncture helps to treat headaches and migraine symptoms. And when people do it consistently, it decreases how often headaches occur. 

Biofeedback

Biofeedback is a technique that uses sensors to measure and track things like muscle tension, heart rate, and breathing patterns. By watching these signals, you can learn how to relax your body and control stress. Over time, this may help lower stress and reduce both the number and severity of headaches. 

When to seek medical attention

If you’re trying to get rid of a headache at home and nothing seems to be helping, it’s a good idea to reach out to a medical professional. They can rule out more serious causes of a headache and recommend prescription medications that may help. 

Some symptoms need immediate medical attention. Don’t wait for an appointment with your regular healthcare team. Go to the ER for your headache if you’re experiencing any of these symptoms:

  • A severe headache, especially if it feels like the worst headache of your life

  • A headache with a sudden onset that goes from 0 to 10 within minutes

  • Stiff neck or fever

  • Seizure

  • Loss of consciousness

  • Recent trauma 

  • Weakness in your arms or legs

  • Trouble talking

  • Confusion or disorientation

  • Vomiting

While many people with headaches — especially migraines — experience some of the above symptoms, these can also be signs of a more serious medical condition. 

Frequently asked questions

You can treat tension headaches by helping your neck and scalp muscles relax. Treatments include OTC medications like ibuprofen or acetaminophen, heating pads or cold packs, massage, meditation, and relaxation exercises. If these don’t help, prescription medications may also help treat tension headaches. 

To get rid of a sinus headache quickly, try oral or nasal decongestants, antihistamines, or OTC pain relievers like acetaminophen or ibuprofen. Warm compresses and nasal saline rinse may also help you get better faster. 

Everyday headaches in females are sometimes caused by changes in estrogen levels. These changes can happen around periods, ovulation, pregnancy, or perimenopause. Daily headaches in females can also be caused by the same triggers as males, such as stress, muscle tension, dehydration, sleep difficulties, certain foods, and medication overuse. 

The bottom line

When a headache disrupts your day, it helps to have some treatments ready to stop it early. For some people, this means traditional OTC medications to help with the pain. For others, alternative therapies may also help. If you experience headaches often, combining these treatments with some lifestyle changes can prevent them from happening in the first place. 

Not every method will work for every headache, so it may be worth experimenting with a few different ones. You may be pleasantly surprised at which one of these therapies works best for you. 

why trust our exports reliability shield

Why trust our experts?

Jill L. Jaimes, MD, is a board-certified pediatric emergency medicine physician with over 20 years of clinical experience. She received her medical degree from Baylor College of Medicine and completed her residency and fellowship training at Texas Children’s Hospital.
Katie E. Golden, MD, is a board-certified emergency medicine physician and a medical editor at GoodRx.
Karen Hovav, MD, FAAP, has more than 15 years of experience as an attending pediatrician. She has worked in a large academic center in an urban city, a small community hospital, a private practice, and an urgent care clinic.

References

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Latest articles