Home Eye Care | How to get rid of a headache or migraine

How to get rid of a headache or migraine

woman with headache

How to get headache relief

No one likes a headache. It’s annoying at best and debilitating at worst. But certain at-home headache remedies can help. After all, the only good thing about a headache is finding something that makes it feel better.

Here are 11 scientifically proven remedies that could help you get rid of your headache:

Apply something cold or warm

One headache remedy is a cold compress. This can be an ice pack or a cold, damp washcloth applied to your forehead, neck or temple area. The cold temperature makes your blood vessels a little smaller and helps numb the pain.

To make your own ice cloth, run a washcloth under cold water, put it in a sealable container, then place it in your freezer. Keep it in the freezer for 15 minutes, then remove the cloth from the container. Hold the ice cloth on your head or neck to help the pain.

Tense muscles in your back, neck or shoulder can trigger certain types of headaches or make them worse. Try placing a heating pad or a warm washcloth on the area. Taking a hot shower can help release muscle tension, too.

Be careful not to damage your skin when you use a warm compress. Don't use one for more than 15 minutes at a time, and make sure the temperature is less than 140 degrees Fahrenheit.

Take a screen break

Most people look at their TV, cell phone and computer screens for at least a few hours every day. If you overdo it, your eyes might start to feel strained.

Eye strain can make your eyes feel tired and dry. It can make your vision a little blurry and your eyes look red.

Eye strain can come with pain in your neck, shoulders and back. It can also lead to a painful headache.

The 20-20-20 rule is a simple headache remedy for strained, tired eyes. After every 20 minutes of screen time, take a 20-second break and focus your eyes on something at least 20 feet away. That gives the tiny muscles in your eyes a chance to relax.

Sometimes, eye strain means that you need prescription eyeglasses or contact lenses. If you already have them, it could be time to update your prescription.

If you've noticed more eye strain lately, get an eye exam. You might be surprised by how much better your eyes feel with new glasses or contacts.

SEE RELATED: Does it matter which doctor I see for eye strain?

Drink some water

Your body needs fluids from the things you eat and drink. If you don't get enough fluids, you could become dehydrated and get a headache.

Mild dehydration is common in the United States. You can usually get relief from a dehydration headache by drinking some water and relaxing for a little while.

Severe dehydration can be a serious medical problem. Get medical help if you're not urinating, if you feel confused or notice any other severe dehydration symptoms.

Try a supplement

Ginger can add a zesty flavor to your dinner, but it could help you get rid of your headache, too. It can also help you feel less nauseated during a migraine.

One study found that ginger was a "safe and promising" way to help with pain. Many migraine patients in another study felt better when they took a ginger supplement with headache medicine.

A magnesium supplement helps your muscles relax and could provide some headache relief. But be careful not to take too much too fast, since magnesium supplements can have a laxative effect.

Keep in mind that supplements and natural remedies affect everyone differently. They can also interact with certain medications and health conditions. Always talk to your doctor before you take anything new.

Drink a little coffee or tea

Many people find at least some headache relief when they have a bit of caffeine. This might be a caffeinated coffee or tea or a medication that has caffeine in it.

Note that drinking or quitting caffeine may trigger a migraine in a small number of people. Research shows this is rare.

Caffeine withdrawal headaches are a more common problem. They can happen when you consume a regular amount of caffeine for a while, then have less of it.

To get rid of them, you'll either need to have caffeine again or use other headache remedies until the pain goes away on its own.

Have a snack

If you haven't had enough to eat or it's been a long time since your last meal, you could have a hunger headache. Eating some food usually gets rid of the headache. If you can, eat something with a lot of healthy nutrients in it.

Missing meals can trigger migraines in some people, too.

If you get headaches after you eat, your body could be sensitive to something in your food. Some of the most common triggers are highly processed foods, things that are high in sugar, aged cheeses and processed meats.

Exercise lightly

When you exercise, your body releases chemicals called endorphins. These hormones are your body's natural painkillers. They also help reduce the stress that can come with a headache.

Exercise could help a stubborn tension headache feel less painful, but try to keep it light. Intense exercise could lead to an exercise headache. It may also trigger a migraine in people who get them.

Make your room darker and quieter

It's common to feel sensitive to light and sound during a migraine headache (even a mild one). This can happen during tension headaches too, but not as often.

For this headache remedy, try turning off the lights and closing the shades. Limit any noise, especially if you're prone to migraines. If possible, relax for a little while or take a short nap.

SEE RELATED: Is an ocular migraine the same thing as a migraine aura?

Relax with a breathing exercise

Relaxation can slow down certain parts of your nervous system and help you feel less pain. It can lower your blood pressure and heart rate, too.

It might seem hard to relax when you have a headache, but breathing exercises can help you unwind more deeply:

Box breathing – Empty your lungs by breathing out slowly. Breathe in through your nose while you count to four. Hold in your breath for four seconds. Breathe out while you count to four. While the air is out of your lungs, count to four again. Repeat these steps a few times. 

4-7-8 breathing – Breathe in through your nose while you count to four. Hold in your breath for seven seconds. Breathe out through your mouth while you count to eight. Repeat these steps a few times.

Diaphragm breathing – Lie on your back with your knees bent. Use a pillow to support your head and knees if you need to. Put one hand below your ribs and one on your chest. Slowly breathe in through your nose so that your stomach moves up. Tense up your stomach muscles and exhale through your mouth with your lips pursed. Repeat these steps several times.

Meditate

People have practiced mindfulness meditation for thousands of years. It can help change the way your brain processes the things you feel.

When someone meditates, they become more aware of their feelings and surroundings without reacting to them. They try to keep their attention on the present moment.

This can help some headaches, migraines and other types of pain. Breathing meditation is a good place to start.

How to meditate: Find a quiet place and sit straight up with your feet flat on the floor (you can lie down if you need to). Close your eyes and focus your attention on your natural breathing. Don't take deeper or longer breaths; just breathe normally.

When you think about your headache pain, frustration or any other feelings, don't "fight" them. Feel them, accept them, then let them go. Then, go back to focusing on your normal breathing.

It's normal to get distracted while you meditate. When it happens, bring your focus back to your breath.

Do this for any amount of time you can. Try to start with five minutes, but only if you feel comfortable.

Consider headache medicine

You might need to take medication when other headache remedies don't help.

Be aware of how often you take headache medications. You can get rebound headaches if you take pain medicine too many times per week. Rebound headaches can be very frustrating and hard to get rid of.

Some drugs can also be hard on your liver, stomach and other parts of your body. Always follow the directions on the label.

For these reasons, doctors usually recommend taking pain medication no more than twice a week.

You don't need a prescription to buy over-the-counter pain medicine. Common drugs and brands include:

  • Ibuprofen (Advil, Motrin)

  • Acetaminophen (Tylenol)

  • Aspirin (Bayer)

  • Acetaminophen and Aspirin with Caffeine (Excedrin)

  • Naproxen (Aleve)

Over-the-counter drugs can help get rid of some mild migraine headaches, too. But many migraines need to be treated with prescription drugs. You'll need to talk to a doctor to get these medications.

Drugs that help stop a migraine after it starts are called abortive medications. Some common drugs and brands are:

  • Triptans (Imitrex, Maxalt)

  • CGRP antagonists (Ubrelvy, Nurtec ODT)

  • Ergot alkaloids (Migranal, Cafergot)

  • Drugs that treat nausea (Reglan, Compazine)

Opioid medications can help some people, but they're very addictive. Doctors usually only prescribe them when nothing else works.

When to talk to a doctor

It's important to talk to your doctor any time you try a new treatment, even if it's natural and doesn't involve drugs.

Everyone is different. A headache remedy that works for one person could worsen someone else's medical problem or interact with their medicine.

Headaches are very common, and most of them aren't dangerous. But rarely, a headache can be a symptom of a medical emergency.

A headache could be an emergency if:

  • You feel extreme pain that you've never felt before.

  • The pain comes on very suddenly and could be described as "explosive" or "violent."

  • You have a fever and stiff neck, and you're nauseated and vomiting.

  • The pain gets worse over 24 hours.

  • The pain happens after you hurt your head.

  • You have any other symptoms of a stroke.

If you notice any of these symptoms or other danger signs, get medical help as soon as you can.

READ NEXT: Why the location of your headache matters

Click the infographic to enlarge

Migraine home remedies. American Migraine Foundation. August 2022.

Ice packs vs. warm compresses for pain. Johns Hopkins Medicine. Accessed April 2023.

Tension-type headaches: Self-care measures for relief. Mayo Clinic. October 2022.

Migraine. MedlinePlus [Internet]. May 2021.

Computer vision syndrome (Digital eye strain). EyeWiki. American Academy of Ophthalmology. April 2022.

Dehydration headache. Cleveland Clinic. December 2021.

Can dehydration cause headaches? Harvard Health Publishing. March 2022.

Dehydration. MedlinePlus [Internet]. May 2019.

Ginger for migraine. The Journal of Clinical Psychology. November 2021.

Clinical trials on pain lowering effect of ginger: A narrative review. Phytotherapy Research. May 2020.

Double-blind placebo-controlled randomized clinical trial of ginger (Zingiber officinale Rosc.) addition in migraine acute treatment. Cephalalgia. May 2018.

Headaches and magnesium: Mechanisms, bioavailability, therapeutic efficacy and potential advantage of magnesium pidolate. Nutrients. August 2020.

The ambiguous role of caffeine in migraine headache: From trigger to treatment. Nutrients. July 2020.

Caffeine-withdrawal headache. The International Classification of Headache Disorders, 3rd edition. January 2018.

Hunger headache. Cleveland Clinic. March 2022.

Glucose-related traits and risk of migraine: A potential mechanism and treatment consideration. Genes. April 2022.

Endorphins. Cleveland Clinic. May 2022.

Primary exercise headache. The International Classification of Headache Disorders, 3rd edition. January 2018.

The association between migraine and physical exercise. The Journal of Headache and Pain. September 2018.

Migraine. National Institute of Neurological Disorders and Stroke. January 2023.

Tension headache. Mayo Clinic. September 2021.

Migraines: Simple steps to head off the pain. Mayo Clinic. October 2022.

Headaches: What you need to know. National Center for Complementary and Integrative Health. August 2021.

Diaphragmatic breathing. Cleveland Clinic. March 2022.

How box breathing can help you destress. Health Essentials. Cleveland Clinic. August 2021.

How to do the 4-7-8 breathing exercise. Health Essentials. Cleveland Clinic. September 2022.

Brain mechanisms of virtual reality breathing versus traditional mindful breathing in pain modulation: Observational functional near-infrared spectroscopy study. Journal of Medical Internet Research. October 2021.

Is mindfulness-based stress reduction a promising and feasible intervention for patients suffering from migraine? A randomized controlled pilot trial. Complementary Medicine Research. February 2020.

How you can ease your aches and pain with meditation. Health Essentials. Cleveland Clinic. April 2022.

Meditation and mindfulness: What you need to know. National Center for Complementary and Integrative Health. June 2022.

Medication-overuse headache (MOH). The International Classification of Headache Disorders, 3rd edition. January 2018.

Medication overuse headaches. Mayo Clinic. February 2023.

Migraine. Mayo Clinic. July 2021.

Medication-overuse headache. StatPearls [Internet]. July 2022.

Headaches: Danger signs. A.D.A.M. Medical Encyclopedia [Internet]. November 2021.

Find Eye Doctor

Schedule an exam

Find Eye Doctor