It may be possible to prevent migraine headaches by avoiding triggers, adjusting dietary and lifestyle factors, or taking supplements. Preventive migraine medications are also available.

Migraine is a neurological condition that causes painful headaches, along with other symptoms. These can include:

  • sensitivity to light or sound
  • nausea
  • vomiting
  • aura, which refers to neurological disturbances that precede the migraine

The best migraine prevention can vary depending on the individual. Sometimes, a person may need to try several approaches to see an improvement.

This article will look at migraine prevention strategies and how to use them.

A man lying down and holding his temples due to migraine pain.Share on Pinterest
Maskot/Getty Images

There is no permanent cure for migraine. However, preventive techniques can help reduce the intensity or frequency of episodes.

Some approaches to migraine prevention include:

  • keeping a migraine diary
  • making dietary or lifestyle changes to avoid triggers
  • trying supplements, such as magnesium
  • trying medications
  • trying complementary therapies

Many people find that certain smells, foods, behaviors, or habits can contribute to migraine. Some people may notice a significant improvement in their symptoms by identifying and avoiding these triggers where possible.

Some examples of common migraine triggers include:

  • too much or too little sleep
  • hunger
  • strong smells
  • bright lights
  • dehydration
  • certain foods or drinks, such as caffeine
  • stress or intense emotion
  • hormonal fluctuations

Keeping a migraine diary can help with identifying triggers. In a migraine diary, people record each episode they have, along with any significant events that occurred that day.

To start a migraine diary:

  1. Choose a place to start recording episodes that is easily accessible, such as a journal.
  2. Begin noting the date and time of each episode.
  3. Include the symptoms, their severity, and anything that makes them better or worse.
  4. Record any information that could help identify triggers, such as food or drink intake, energy levels, or overall mood.

People who menstruate may also want to note when their symptoms occur during a menstrual cycle.

Over time, the diary may allow people to identify patterns between the days they experience migraine and help them determine any specific triggers they may have. They can then make dietary or lifestyle changes as needed.

In addition to being useful for trigger identification, migraine diaries can also help doctors track whether a new treatment is working.

Once someone has an idea of what may contribute to their migraine episodes, they can begin to make changes to avoid their triggers.

Avoiding triggers is not always possible, so it can help to focus on what is within a person’s control. Some examples of changes that may help, depending on the individual, include:

  • eating regular meals to avoid hunger
  • staying hydrated, particularly during or after exercise
  • keeping a regular sleep schedule to avoid under or oversleeping
  • limiting or avoiding caffeine and alcohol
  • taking steps to reduce and manage stress, such as taking regular breaks while working

Some examples of more specific changes that may help people who can identify particular triggers include:

  • avoiding specific foods or food additives
  • avoiding bright or flashing lights
  • avoiding strenuous exercise

Contact a doctor or dietitian if many foods appear to cause migraine, as this may indicate a different condition, such as an intolerance.

Some research suggests that certain nutrients and herbal supplements may reduce the likelihood of migraine.

Remember that supplements can interact with other drugs and may cause side effects. Always contact a doctor before trying supplements, especially if taking other medications at the same time.

The following sections will look at some supplements to try in more detail.


According to one 2020 review, low magnesium correlates with a higher risk of migraine. Additionally, a 2018 systematic review found that magnesium is possibly effective as a preventive remedy for migraine.

Magnesium plays an important role in electrical signals that pass between neurons, which may explain why low magnesium levels make migraine more likely.

The 2018 review suggests a dosage of 600 milligrams (mg) of magnesium citrate for acute migraine prevention. People can also take a lower daily dose to help manage their magnesium levels.

The amount of magnesium people need daily varies depending on their age and sex. For most adults, the amount will be around 310–420 mg.

Vitamin B2

Some small studies suggest that vitamin B2, or riboflavin, may help reduce the frequency of migraine episodes.

A 2022 study found that taking 400 mg of vitamin B2 per day for 3 months helped decrease the frequency and intensity of migraine attacks.

A person can discuss with their doctor whether trying vitamin B2 alongside other treatments is an option for them.

Coenzyme Q10

Emerging research suggests that the coenzyme Q10 (CoQ10) may reduce the frequency or duration of migraine episodes.

A 2019 meta-analysis of five studies suggests that CoQ10 offered superior results than a placebo.


A 2015 review found evidence suggesting that feverfew may reduce migraine frequency.

The researchers concluded that feverfew resulted in 0.6 fewer migraine episodes per month than a placebo.

However, the authors note that more high quality trials are necessary. The National Center for Complementary and Integrative Health also points out that study results have been mixed.


A 2020 systematic review of herbal migraine treatments found limited evidence to suggest that butterbur may prevent migraine episodes.

A 2017 study in rats identified a specific channel through which butterbur relieves migraine, suggesting that it may work in the same way in humans.

More research into the benefits of butterbur for migraine prevention is necessary.

People who experience frequent migraine episodes may require medications.

Some of the most popular migraine medications are triptans. These medications work specifically on migraine. Triptans cannot prevent migraine, but they can stop the symptoms from progressing once they begin.

Medications that may be able to prevent migraine from occurring include:

  • calcitonin gene-related peptide antagonists, which include erenumab
  • antihypertensives, such as calcium channel blockers or beta-blockers
  • anticonvulsants, such as topiramate
  • antidepressants, such as amitriptyline or venlafaxine
  • Botox, which doctors can inject once every 3 months for chronic migraine

People with migraine that is primarily due to hormonal changes, or menstrual migraine, may benefit from hormonal medications. These could include birth control pills or hormone replacement therapy.

Several complementary therapies could help reduce the regularity of migraine episodes.

The following sections will look at some of these therapies in more detail.


A 2020 article notes that acupuncture may help reduce migraine pain in some people. However, more research on its role in preventing migraine is necessary.


Biofeedback helps people become aware of their bodily functions so that they can learn to control or regulate them.

According to a 2017 review, one study showed that 62% of participants undergoing biofeedback experienced partial or total improvement in their migraine symptoms. Participants had 40 biofeedback sessions over 6 months, on average. Only 16% of them saw no improvements at all.


Neuromodulation is a treatment that uses weak electrical impulses or magnets to stimulate the nerves. Doctors think that it may work by preventing migraine-related brain activity or by releasing chemicals that relieve pain.

Some types of neuromodulation that may help reduce migraine include:

  • noninvasive multi-channel brain neuromodulation systems
  • single-pulse transcranial magnetic stimulation
  • transcutaneous supraorbital neurostimulators
  • noninvasive transcutaneous vagal nerve stimulation

Here are some frequently asked questions about migraine.

What is the best prevention of migraine?

There are numerous possible preventive treatments for migraine, and the best type may be different for each individual. Doctors may recommend avoiding triggers, taking supplements, and trying medications.

How can I prevent migraine naturally?

Natural approaches to preventing migraine can include making dietary changes. For example, if caffeine or alcohol triggers a person’s migraine headaches, then avoiding these can help prevent them. Staying hydrated, getting enough quality sleep, avoiding bright lights, and managing stress may also help.

Do electrolytes prevent migraine?

According to the American Migraine Foundation, many people with migraine need to replenish electrolytes. A person’s doctor can advise on how to replenish electrolytes to help prevent migraine.

Some people may be able to prevent or reduce the frequency of migraine episodes by identifying triggers and adjusting their diet or daily routines accordingly.

Other migraine prevention methods include complementary therapies and certain dietary supplements.

However, people with frequent or severe migraine headaches may require medication. If someone has concerns about migraine, it is best to contact a doctor.