“I get this question a lot from patients,” says Lauren Doyle Strauss, DO, a headache specialist and an assistant professor at Wake Forest Baptist Health in Winston Salem, North Carolina. “A fever that comes with a headache or migraine can be very concerning for both patients and their families,” Dr. Strauss says. Although many common illnesses can cause such symptoms, there are rare cases where a headache and fever occurring together may be a sign of a serious illness. Here’s what to know about headache, migraine, and fever:

1. Any Illness Can Trigger a Migraine

It’s thought that when you have any kind of illness — including a viral or bacterial infection — it can potentially cause headache, especially in people who have a genetic tendency to have migraine, says Strauss. “We know that when you are not sleeping, when you have poor hydration, or when you’re not caring for yourself, any of those things can trigger a headache, and so it makes sense that an illness could trigger a headache as well,” says Strauss. Whether or not you’ve been diagnosed with migraine, if you experience a headache or other migraine symptoms and a fever, and it’s severe and persisting, you should check in with your doctor, she says. “It could warrant a medical workup,” she adds.

2. Headache and Fever Could Be Signs of an Infection

“If your system is under attack from a viral illness, then a fever is part of your body’s response to the infection,” says Strauss. If you also have a headache, the fever itself may be contributing to the headache, but it may also just be the infection in general causing a headache, she says. “If the headache’s severe, it could be a really serious infection, like meningitis or encephalitis,” says Strauss. Meningitis is an inflammation of the protective membranes that cover the brain and spinal cord, and is most often caused by a bacterial or viral infection of the brain and spinal fluid, according to the Centers for Disease Control and Prevention (CDC). Babies and children are at the highest risk for meningitis, though it can happen at any age. “Sometimes those patients have other symptoms to go along with that, like neck pain, neck stiffness, or neurologic symptoms [such as confusion],” says Strauss. Encephalitis is the inflammation of the active tissues of the brain that is the result of an infection or an autoimmune response, according to Johns Hopkins Medicine. In addition to headache and fever, symptoms can include seizure, neck stiffness, and sensitivity to light and sound. These infections can be life-threatening emergencies. “Depending on the severity of the situation, you may need to go to an urgent care center or emergency room for a fever with a headache,” Strauss says.

3. Use a Thermometer to Confirm a Fever

In some cases when a person reports having a fever every time they have a migraine, it’s possible they may not actually have a fever, says Strauss. “I often discuss the definition of fever with patients; in medicine we consider a fever 100.4 degrees F or higher,” she says. “Feeling warm,” or having someone else feel your forehead, isn’t a reliable way to confirm if you have a fever, says Strauss. “You actually want to take the objective temperature with a reliable method, such as an ear thermometer an oral thermometer, to be certain, and if it’s under 100.4, it’s not a fever,” she explains. “I have a lot of patients who don’t meet that threshold but say, ‘Well, this is high for me; I normally have a temperature of 97, and now it’s 98,’” says Strauss. “That still doesn’t make it a fever.” If you are taking your temperature and it meets the criteria for a fever, and it’s happening with a lot of your headaches, that could mean an underlying illness — something other than migraine — may be causing the headaches, says Strauss.

4. A Hemiplegic Migraine Attack Can Include Fever

Familial hemiplegic migraine (FHM) and sporadic hemiplegic migraine (SHM) are both rare types of migraine; the two diseases are essentially the same, but FHM is inherited and SHM is not. The hallmark symptom of this type of migraine is weakness on one side of the body that happens just before or during the headache phase of the migraine attack, according to the National Organization for Rare Disorders. A visual aura is usually present in this type of migraine, and visual symptoms can include a bright light in the center of the field of vision that causes blind spots, flashing lights, and double vision. In severe attacks, hemiplegic migraine can cause confusion, memory loss, personality or behavioral changes, fever, seizures and even coma, according to MedlinePlus.

5. Symptoms of Mononucleosis or Sinusitis Can Include Headache and Fever

Epstein-Barr virus, which causes most cases of mononucleosis, or mono, is a member of the herpesvirus family and very common, says Strauss. “It’s notorious for causing a pretty refractory headache,” she adds. The headache caused by an Epstein-Barr virus infection resembles a tension-type headache, with aching pain but not with the other symptoms that often accompany migraine, such as nausea and vomiting, according to the National Headache Foundation. Sinusitis or a sinus infection due to either a virus or bacterial infection could cause worsened headaches and fever, says Strauss. “This can even occur in a person with established migraine; if they develop sinus disease, they could have fever with migraine,” she says. Other signs or symptoms of a sinus infection include facial pain, teary or reddened eyes, postnasal drip, and head pain that gets worse while leaning forward, she adds.

6. Keep Track of Any Symptoms Besides Headache and Fever

Keeping track of certain signs and symptoms such as joint pain or redness, elevated blood pressure, and rashes may help your doctor make a proper diagnosis, says Strauss. “A fever with headache could be a sign of a lot of different inflammatory or rheumatological conditions such as lupus, and so that’s why paying attention to rashes and joint pain and joint aches is important,” she says. A low-grade fever is a symptom of lupus, and headaches can also occur because of how the disease affects the nervous system, according to the Lupus Foundation of America. There are also some really rare syndromes where headache and fever can go together, says Strauss. Familial Mediterranean fever is a rare inherited condition that can occur in patients with Mediterranean heritage, says Strauss. “It can start as just fevers that occur intermittently,” she says. People with familial Mediterranean fever have recurrent episodes of painful inflammation in the abdomen, chest, or joints that can last between 12 and 72 hours, according to MedlinePlus. Other symptoms can include rash or headache. The first episode usually happens during childhood or teenage years but can happen later in life as well. A fever can sometimes be present with pheochromocytoma, an exceedingly rare tumor that occurs in adrenal gland tissue, says Strauss. The tumor causes the release of too much epinephrine and norepinephrine, the hormones that govern heart rate, metabolism, and blood pressure, according to MedlinePlus. When the tumor releases the hormones, it can cause heart palpitations, headaches, sweating, and very high blood pressure.

7. A COVID-19 Infection Can Cause Headache and Fever

“A headache with a fever that comes out of the blue could potentially mean a COVID-19 infection,” says Strauss. This could be the case whether you have a migraine diagnosis, another type of headache disorder, or don’t usually get headaches, she adds. Other symptoms of COVID-19 include cough, shortness of breath, fatigue, muscle aches, new loss of taste or smell, nausea or vomiting, and diarrhea, according to the CDC. If you suspect you have COVID-19, make sure you let your doctor know before scheduling an appointment so that they may take the proper precautions, advises Strauss. Anyone experiencing symptoms such as trouble breathing, persistent pain or pressure in the chest, new confusion, or the inability to stay awake, or who has pale gray or blue skin, lips, or nail beds may have severe COVID-19 and should seek emergency medical care right away.