Skip to main content
Headaches

What Can You Take for a Headache While Pregnant?

Stacia Woodcock, PharmDChristina Aungst, PharmD
Written by Stacia Woodcock, PharmD | Reviewed by Christina Aungst, PharmD
Updated on January 26, 2026

Key takeaways:

  • Home remedies are the safest option to manage a headache while pregnant, followed by acetaminophen (Tylenol). Experts consider acetaminophen a first-choice pain medication during pregnancy.

  • If these options don’t work, talk to your prenatal care team for guidance. They can determine what’s causing your headaches and the best option to treat them. If you do need medication, it’s best to take the lowest dose for the shortest time possible.

  • Be sure to let your prescriber know if you were taking migraine medications before you became pregnant. They may need to change your treatment options to ensure the safety of you and the fetus.

Save on related medications

Headaches are common during pregnancy. But figuring out how to treat them safely can feel overwhelming. Since many medications can affect a developing fetus, it’s important to know which options are safer — and which ones to avoid.

Here, we’ll walk through the best ways to manage headaches during pregnancy. We’ll also cover headache treatments that aren’t recommended while pregnant and how your prenatal care team can help you choose the right option for you.

Home remedies for headaches during pregnancy

In general, it’s best to take as little medication as possible during pregnancy. So lifestyle changes and alternative therapies are typically the best place to start to manage headaches when they occur. Some methods to try include:

  • Take a nap.

  • Sit in a dark, quiet room with few distractions.

  • Place a cool compress on your forehead or neck.

  • Massage your head or temples.

  • Do gentle yoga or stretching exercises.

  • Try a nasal saline rinse for sinus pressure-related headaches.

  • Exercise regularly.

  • Eat small, frequent meals to keep blood sugar (glucose) levels from dropping.

  • Drink plenty of fluids to stay hydrated.

  • Try acupressure or acupuncture.

  • Consider trying cognitive behavioral therapy.

OTC medications for headaches during pregnancy

No over-the-counter (OTC) medication is considered completely safe to take during pregnancy. Your prenatal care team can help you weigh the risks and benefits of your options to help you decide what’s best for your needs. The two main options include acetaminophen (Tylenol) and nonsteroidal anti-inflammatory drugs (NSAIDs).

Most medical experts consider acetaminophen a safe and effective choice for headaches during pregnancy. It’s also the preferred OTC pain reliever to take while pregnant.

There is some speculation about the risk of developmental conditions, such as autism and attention-deficit hyperactivity disorder (ADHD), for children exposed to acetaminophen during pregnancy. But the research hasn’t confirmed a cause-and-effect relationship between the two. And expert organizations stand behind the safety of acetaminophen during pregnancy. Still, taking the lowest effect dose for the shortest time needed can help minimize any risk.

NSAIDs, on the other hand, have more restrictions during pregnancy. NSAIDs include OTC medications such as ibuprofen (Advil, Motrin) and naproxen (Aleve). They aren’t considered a first-choice option for a headache while pregnant, but your prescriber may recommend them in certain cases.

There’s some evidence that NSAIDs can lead to birth defects if taken during the first trimester (weeks 1 to 12) of pregnancy. There’s also a risk of heart, kidney, and lung problems for the fetus if you take NSAIDs after the 20th week of pregnancy. But if acetaminophen isn’t effective, and you’re in your second trimester of pregnancy, your prenatal team may OK taking an NSAID for 48 hours (2 days) or less if needed.

Prescription medications for headaches during pregnancy

As with OTC medications, no prescription medication is considered completely safe during pregnancy. But if your headaches are severe and don’t respond to lifestyle changes or OTC medication, or you experience migraines, your prenatal care team may consider them.

The most common prescription medications used for headaches or migraines during pregnancy include:

Keep in mind that most of these medications aren’t FDA approved for headache or migraine treatment during pregnancy. So they’re typically prescribed off-label for this use. Your prenatal team can review the risks and benefits of your options to help you choose the right fit for your needs.

4 headache medications to avoid during pregnancy

There are several headache medications that aren’t safe during pregnancy. Some medications have risks of birth defects, miscarriage, and preterm birth (before 37 weeks of pregnancy). More research is needed for other headache medications to say whether they’re safe.

1. Triptans, other than sumatriptan

As mentioned, sumatriptan is sometimes prescribed for severe headaches during pregnancy when other treatment options haven’t worked. But it’s best to avoid other medications in the same class as sumatriptan (known as triptans). This includes rizatriptan (Maxalt), zolmitriptan (Zomig), and others. There’s less information that these triptans are safe to take during pregnancy.

2. Ergot derivatives

Dihydroergotamine (Migranal, D.H.E. 45) and Cafergot (ergotamine / caffeine) are older migraine medications. They’re not prescribed very often, but these medications aren’t safe during any stage of pregnancy.

These ergot-based medications work by tightening blood vessels in the brain. But they can also tighten blood vessels in the uterus, reducing blood flow to the developing fetus. This can lead to birth defects and low birth weight. Ergot derivatives can also cause premature contractions, which can lead to an early birth.

3. CGRP antagonists

Calcitonin gene-related peptide (CGRP) antagonists are the newest type of migraine medication available. Examples include Ubrelvy (ubrogepant), Nurtec ODT (rimegepant), and Aimovig (erenumab).

Since these medications are relatively new, there’s not much information about their safety during pregnancy. But the CGRP protein is important for the development of a healthy fetus. And since these medications block the CGRP protein, there’s a significant concern about the risks of using them while pregnant. Currently, it’s recommended to avoid taking these medications during pregnancy.

4. Butalbital-containing medications

During pregnancy, don’t take any headache medications that contain butalbital. Examples include Bupap (butalbital / acetaminophen) and Fioricet (butalbital / acetaminophen / caffeine).

Butalbital is a barbiturate that helps you relax and lowers anxiety. It can pass through the placenta and affect a developing fetus. Studies suggest that butalbital use during pregnancy is linked to certain heart defects.

Butalbital can also be habit-forming if taken long term. This can cause your unborn baby to become dependent on the medication. Once born, your baby may show signs of neonatal abstinence syndrome (NAS). Signs of NAS include seizures, high-pitched crying, and poor feeding. If not treated, NAS can lead to long-term health problems.

How to choose a headache medication while you’re pregnant

In general, it’s best to start with lifestyle changes and medication-free options for headaches during pregnancy. From there, acetaminophen is typically the next step.

If headaches persist or don’t improve, it’s time to touch base with your prenatal care team. They can check for a medical reason causing your headaches, such as preeclampsia (high blood pressure during pregnancy) or dehydration. Once your care team evaluates you, they can discuss the risks and benefits of prescription headache treatments with you and make a recommendation.

If you were already taking medication for migraines before you became pregnant, be sure to let your prenatal care team know. They may decide to continue your current treatment regimen or make changes to help protect your and your baby.

Frequently asked questions

There are many different things that can cause headaches during pregnancy. Common factors include hormone changes, caffeine withdrawal, and lack of sleep. Low blood sugar, dehydration, and tension from carrying extra pregnancy weight can also lead to headaches. Preeclampsia (high blood pressure during pregnancy) is a more serious cause of headaches during pregnancy. This is why it’s best to seek medical care for headaches that are severe, don’t go away, or occur along with swelling or vision changes.

Sometimes, but not always. In many cases, headaches will be temporary and you can resolve them with home remedies, such as better sleep and hydration. But headaches during pregnancy can sometimes be a sign of a more serious issue, such as preeclampsia or bleeding in the brain. Often, a serious headache will appear suddenly or occur along with other symptoms, such as a fever or high blood pressure. In this case, it’s best to seek emergency care. But it’s a good idea to talk to your prenatal team about any headaches that occur during pregnancy. They help determine whether or not it’s something to be concerned about.

The bottom line

Home remedies are the safest option to manage a headache while pregnant, followed by acetaminophen (Tylenol). If these options don’t work, talk to your prenatal care team for guidance. They can determine what’s causing your headaches and the best option to treat them. If you do need medication, it’s best to take the lowest dose for the shortest time possible.

Be sure to let your prescriber know if you were taking migraine medications before you became pregnant. They may need to change your treatment options to ensure the safety of you and the fetus.

why trust our exports reliability shield

Why trust our experts?

Stacia Woodcock, PharmD, is a pharmacy editor for GoodRx. She earned her Doctor of Pharmacy degree from the University of Kentucky and is licensed in New York and Massachusetts.
Christina Aungst, PharmD, is a pharmacy editor for GoodRx. She began writing for GoodRx Health in 2019, transitioning from freelance writer to editor in 2021.

References

American Pregnancy Association. (n.d.). Caffeine during pregnancy.

Arnold, M. J. (2022). Headache during pregnancy and breastfeeding: ACOG recommendations.

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