Pregnancy is an exciting time, but it isn’t without headaches — both figuratively and literally.

Hormonal changes during pregnancy can take a toll on your body, causing a range of symptoms from the first trimester onward. These symptoms can include nausea and fatigue, as well as frequent aches and pains.

Before getting pregnant, maybe you reached for ibuprofen (Advil or Motrin) to knock out pain and inflammation. Now that you’re pregnant, this isn’t the best choice. Here’s more info — and some alternatives for pain relief.

Ibuprofen is a nonsteroidal anti-inflammatory drug (NSAID) used to relieve fever and mild to severe pain.

For some people, it’s a first-choice medication for various issues like headaches, menstrual cramps, arthritis, muscle aches, and even dental pain. It relieves pain by blocking prostaglandin, a natural compound that sends pain signals.

Aches and pains are common during pregnancy, so don’t be alarmed if you don’t feel quite like yourself.

For example, according to one 2008 study, about 50 percent to 80 percent of pregnant women experience lower back pain during pregnancy, and about 50 percent have pelvic pain.

Why is this the case? For one, a growing bump puts a lot of added stress and pressure on the spine, triggering back pain.

Also, as the body produces the hormone relaxin — which loosens joints and ligaments in preparation for labor and delivery — tenderness and soreness in the pelvic area can follow.

A larger abdomen can also cause rib pain, and rapid weight gain may lead to leg cramps. As if these problems weren’t enough, shifting hormonal changes are also responsible for headaches, which sometimes worsen with stress or poor posture.

These aches and pains can start as early as the first trimester and continue up until delivery, so understandably, you want a medication that provides quick relief.

Although ibuprofen can offer quick relief from aches and pains when you’re not pregnant, it isn’t the best choice to take during pregnancy.

Pregnant women are advised to avoid ibuprofen during pregnancy, especially if they’re 30 or more weeks pregnant.

Taking the medication at 30 weeks and beyond could cause premature closing of a baby’s ductus arteriosus. This is a blood vessel that must remain open during pregnancy to ensure your baby receives adequate nutrients and oxygen.

The blood vessel closes naturally a few days after birth. But premature closing in the womb can cause high blood pressure in your baby’s lungs.

Taking ibuprofen after 30 weeks might also cause heart problems in your baby and reduce your amniotic fluid, which is needed to cushion your baby and the umbilical cord and help with lung development.

Ibuprofen use during the second and third trimester might even increase your baby’s risk of developing asthma, according to one large 2013 cohort study.

Some research warns that NSAIDs like ibuprofen and/or opioids during pregnancy can increase the risk of other issues like:

However, the link isn’t conclusive as researchers have been unable to establish a direct connection.

Before 30 weeks, research is unclear if ibuprofen might increase the risk of miscarriage in some women. It’s important to note that more research is needed as this link hasn’t been confirmed.

Ibuprofen doesn’t appear to cause stillbirth, low birth weight, or behavioral problems in children.

Of course, there’s the possibility of taking ibuprofen before realizing that you’re pregnant. This can happen since some women don’t learn about a pregnancy until halfway through the first trimester. Should you worry?

Although experts recommend avoiding ibuprofen during pregnancy, the good news is that taking the medication before you know you’re pregnant is unlikely to harm your baby. Just make sure you stop taking the drug as soon as you learn your pregnancy status.

If you’ve taken ibuprofen at any point during pregnancy, notify your doctor.

Avoiding ibuprofen during pregnancy doesn’t change your need for immediate pain relief at times. What are your options?

To more safely relieve aches and pains during pregnancy, use acetaminophen (Tylenol) instead. (Note that no medication is considered 100 percent safe.)

Tylenol is generally recommended for pain in all stages of pregnancy — first, second, and third trimester. Even so, you should still consult your doctor first. And if possible, limit use of the pain reliever and take the lowest dose.

For mild pain, you might be able to relieve discomfort without medication.

For example, use a heating pad or a warm compress to relieve backaches, headaches, leg cramps, and pelvic pain. You can also alternate between heat therapy and cold therapy to reduce inflammation.

Other natural remedies include:

Also, ask your OB-GYN about seeing a chiropractor to manage joint pain during pregnancy.

Pregnancy pain can range from mild to severe. If you’re dealing with mild discomfort, you might be able to relieve pain with natural home remedies. For moderate to severe pain, a safer pain reliever can reduce inflammation and help you feel better — but always consult your doctor first.

If you have unmanageable pain at any point during your pregnancy, call your doctor right away.