“People who have migraines are more sensitive to stimuli such as light, smells, and sounds — not just during headaches, but also in between attacks,” says Gretchen Tietjen, MD, the director of UTMC Headache Treatment and Research Program at The University of Toledo in Ohio and a member of the American Academy of Neurology. Here are a few migraine prevention tips that may work for you.

1. Evaluate your ergonomics.

Are you straining your neck to see your computer monitor? If so, you might be aggravating your neck muscles, which can lead to neck pain and then migraines, says Nauman Tariq, MBBS, an assistant professor of neurology and the director of the Johns Hopkins Headache Center at Johns Hopkins Medicine, in Baltimore. He explains that neck pain may trigger a migraine by stimulating the trigeminal nerve, the main nerve that carries pain signals from your neck, mouth, head, and face to your central nervous system. Likewise, bending your neck to look at your cellphone or carrying a heavy purse or bag could also cause strain on your neck.

2. Stay indoors on very hot or very cold days.

For some people, extreme temperatures and weather changes can trigger a migraine, which is thought to be a dysfunction of the hypothalamus, the small area in the brain that regulates things like body temperature, says Dr. Tariq. Changes in barometric pressure can also lead to sinus changes, which, in turn, can trigger headaches, says Kevin Weber, MD, a neurologist at The Ohio State University Wexner Medical Center, in Columbus, Ohio. While you can’t change the forecast, you can try to avoid exposure to extreme temperatures by dressing appropriately and avoiding outdoor activities on very hot or very cold days. “Wild fluctuations of caffeine can trigger migraines,” says Dr. Weber. “Have small amounts regularly.”

4. Drink plenty of water.

Dehydration triggers migraines for about one out of every three people who have the condition, according to the American Migraine Foundation (AMF), because the  hypothalamus senses thirst.

5. Take a nap.

In some people with migraines, taking a 20- to 30-minute nap at the first sign of an attack can often abort the migraine, possibly by turning off the firing of certain nerves in the body, says Dr. Tietjen.

6. Avoid strong smells.

According to the AMF, strong odors — like those from perfumes or even food — could trigger a migraine or worsen an existing one. If you have a coworker who wears a strong fragrance, politely tell them that their scent is a trigger for you, or talk to someone about moving your workstation.

7. Wear light-filtering shades.

One of the most common migraine triggers is sensitivity to light, and some people have found migraine relief by wearing light-filtering glasses. A word of caution: If you use them too often, some experts worry that the effects of unfiltered light will be much stronger, says Teshamae Monteith, MD, an assistant professor of clinical neurology and the chief of the Department of Neurology Headache Division at the University of Miami Miller School of Medicine in Miami, Florida, and a member of the American Academy of Neurology.

8. Know your food triggers.

Food triggers can differ from person to person, but there are some that seem to cause more attacks than others, such as MSG (monosodium glutamate), aged cheeses, alcohol, cured meats, dried fruits, dairy, artificial sweeteners, and more. While it’s not easy to do an elimination diet — and drastically removing healthy foods from your meals may not be a good idea — you may want to keep a food diary to see if you can identify some of your migraine triggers, says Dr. Monteith.