Many things can irritate or strain the nerves in the neck, which could trigger a headache. This includes poor posture, neck strain, injury, or medical conditions like a pinched nerve or herniated cervical disk.

Neck pain and headaches are often mentioned at the same time, as a stiff neck can cause a headache.

Read on to learn what can cause both neck pain and a headache.

There are several factors that can contribute to neck pain, including injuries, strains, and certain medical conditions.

Some common causes of neck pain include:

A herniated cervical disc occurs when one of the soft discs between one of the seven vertebrae in your neck becomes damaged and bulges out of your spinal column. If this presses on a nerve, you can feel pain in your neck and head.

A pinched nerve occurs when a nerve in your neck is irritated or compressed. With so many sensory nerve fibers in the spinal cord in your neck, a pinched nerve here can result in a number of symptoms, including:

Other symptoms can include shoulder pain along with muscle weakness and numbness or tingling sensations.

Some types of headaches can contribute to neck pain, which may be caused by issues with certain muscles or nerves.

The source of a tension headache is often traced back to a buildup of:

These conditions can result in tightened muscles at the back of your neck and the base of your skull.

A tension headache is often described as mild to moderate pain that feels like a band tightening around your head. It’s the most common type of headache.

Migraine

Migraine is often associated with moderate to severe, throbbing pain in the head or neck.

This can cause neck pain and other migraine symptoms, like nausea and increased sensitivity to sound or light.

Some of the most common triggers for migraine headaches include:

  • stress
  • hormone fluctuations
  • skipping meals
  • changes in weather

Temporomandibular joint (TMJ) disorders

TMJ disorders affect the jaw and the muscles and ligaments that surround it.

Although it can be difficult to determine the specific cause of TMJ disorders, they may be due to a combination of factors, including:

TMJ can affect the jaw bone and muscles around the jaw joint. This can be worsened by chewing gum, eating ice, and eating crunchy or chewy foods. This may lead to pain and swelling in the surrounding tissues, including the neck.

It may also cause other symptoms, like jaw popping, ear pain, and tooth sensitivity.

Some types of headaches could be caused by certain neck problems, including injury, inflammation, and chronic neck tension.

Cervicogenic headache (CGH)

Cervicogenic headaches are considered secondary headaches, meaning that they’re caused by other issues, like neck problems.

Some of the potential causes of cervicogenic headaches include:

Because the cervical nerves are responsible for relaying pain signals, neck problems can trigger cervicogenic headaches, which could cause pain, stiffness, nausea, blurred vision, and increased sensitivity to light or sound.

Occipital neuralgia is a type of headache characterized by throbbing pain, which usually begins in the neck and moves upwards.

This type of headache may also cause pain in the back of the head, scalp, forehead, and behind the ears or eyes.

It’s usually caused by injury, irritation, or inflammation of the occipital nerves, which are a type of nerve found in the scalp.

This could be due to issues like:

Treatment for neck pain and headache can vary based on many factors, including the cause, severity, and type of issue that you’re experiencing.

Treating headaches

Your doctor might recommend any of a variety of treatments, depending on the specific type and cause of your headaches.

Several medications are commonly used to treat headaches, including:

  • Over-the-counter (OTC) pain relievers. These include ibuprofen (Motrin, Advil) or acetaminophen (Tylenol). But overuse of Tylenol could cause more headaches.
  • Prescription pain relievers. Examples include naproxen (Naprosyn), ketorolac tromethamine (Toradol), or indomethacin (Indocin).
  • Triptans. These drugs treat migraines and would be prescribed for someone experiencing tension headaches along with migraines. An example is sumatriptan (Imitrex).
  • Steroid injections. This treatment is often recommended for headaches to help calm the nerves and decrease swelling. It may be especially useful for occipital neuralgia, migraines, and TMJ disorders.
  • Muscle relaxers. Some types of muscle relaxers, like tizanidine (Zanaflex), can help reduce tension and stiffness in the muscles to treat headaches, occipital neuralgia, and TMJ disorders.
  • Ditans. These medications may be used to relieve nausea or increased sensitivity to light or sound associated with certain types of headaches, like migraines. One of the most common types is lasmiditan (Reyvow).
  • Tricyclic antidepressants. This class of medications is sometimes prescribed to prevent migraine and occipital neuralgia.
  • Anticonvulsants. These drugs may help reduce symptoms caused by migraine or occipital neuralgia.
  • Blood pressure medications. One 2015 review found that beta-blockers like propranolol, atenolol, and metoprolol may help decrease migraine symptoms.
  • Botox injections. Botox is an FDA-approved treatment for chronic migraines. One 2017 review found that it’s been shown to reduce migraine severity and frequency.

Your doctor might also recommend a massage to help relieve the tension in your neck and shoulders.

If your headache is caused by other factors like jaw or neck problems, treatment may focus on addressing underlying issues. It may involve a combination of exercise, physical therapy, medications, cold/heat therapy, or rest.

In severe cases, surgery may also be recommended for issues like TMJ disorders or occipital neuralgia if other treatment methods don’t help. But in the case of TMJ, a doctor may recommend using a mouthguard at night to prevent teeth grinding (which can contribute to headaches).

Treating a pinched nerve in your neck

Your doctor may recommend one or a combination of the following treatments for a pinched nerve in your neck:

  • Cervical collar. This is a soft, padded ring that limits motion. It allows the neck muscles to relax.
  • Physical therapy. Following a specific set of guided, physical therapy exercises can strengthen neck muscles, improve range of motion, and relieve pain.
  • Oral medication. Prescription and OTC medications your doctor might recommend to ease pain and reduce inflammation include aspirin, naproxen, ibuprofen, and corticosteroids.
  • Injections. Steroid injections are used to lessen swelling and relieve pain for a long enough period for the nerve to recover.

Surgery is an option if these less invasive treatments don’t work.

Treating a herniated cervical disc

Surgery for a herniated disc is necessary for only a small number of people. In some cases, a doctor may recommend more conservative treatments instead, including:

To prevent headaches related to neck pain, there are things you can do to avoid a stiff neck at home. Consider the following:

  • Practice good posture. When standing or sitting, your shoulders should be in a straight line over your hips with your ears directly over your shoulders. Forward head posture, which is common when using electronics, could be a culprit. Here are 12 exercises to improve your posture.
  • Adjust your sleep position. Try to sleep with your head and neck aligned with your body. Some chiropractors recommend sleeping on your back with a pillow under your thighs to flatten your spinal muscles.
  • Customize your workspace. Adjust your chair so your knees are a bit lower than your hips. Place your computer monitor at eye level.
  • Take breaks. Whether you’re working at your computer for long periods of time or driving long distances, frequently stand up and move. Stretch your shoulders and neck.
  • If you smoke, consider quitting. Among other problems it can cause, smoking can increase your risk of developing neck pain.
  • Watch how you carry your stuff. Don’t use an over-the-shoulder strap to carry heavy bags. This goes for purses, briefcases, and computer bags, too.

A stiff neck and headache are typically not something to worry about. But there are some situations when a doctor visit is needed. They include the following:

  • The neck stiffness and headaches are persistent for a week or two.
  • You have a stiff neck and numbness down your arms.
  • A serious injury is the reason for your stiff neck.
  • You experience a fever, confusion, or both alongside neck stiffness and headache.
  • Eye pain accompanies your stiff neck and headache.
  • You experience other neurological symptoms, such blurry vision or slurred speech.
  • You experience headaches that wake you up from sleep.
  • You experience “thunderclap” headaches.
  • You have headaches that are limiting your daily activities.
  • You have headaches that are not responding to conservative treatment.

It’s not unusual for a stiff neck and headache to occur at the same time. Often, neck pain is the driving force behind a headache.

Stiff necks and headaches are commonly connected to lifestyle habits. Self-care and lifestyle changes can usually treat a stiff neck and headache.

If you have persistent, intense neck pain and headaches, consider talking with your doctor. This is especially the case if you’re also experiencing other symptoms, like:

  • fever
  • arm numbness
  • blurry vision
  • eye pain

Your doctor can diagnose the underlying cause and provide the treatment you need to get relief.