Medicines are designed to treat illnesses, control symptoms, or prevent health problems. However, almost every medicine can cause unwanted effects, commonly called side effects. Headache is one of the side effects associated with many prescription medicines, over-the-counter products, and supplements (American Migraine Foundation, 2023).
Developing a headache after taking medicine does not always mean that the medicine is dangerous or that the person is allergic to it. Sometimes the headache is a temporary side effect that improves as the body adjusts. In other cases, it may result from the medicine’s effect on blood vessels, blood pressure, body fluids, hormones or chemical signals in the nervous system. Headaches can also occur when certain medicines are used too frequently, interact with other substances or are stopped suddenly.
What Is a Headache?
A headache is pain or discomfort felt in the head, scalp, face or upper neck. Although the pain may feel as if it is coming from inside the brain, brain tissue itself does not feel pain in the same way as pain-sensitive parts of the body. Headache pain generally comes from structures in and around the head, including nerves, blood vessels, muscles, the scalp and the tissues surrounding the brain (International Association for the Study of Pain [IASP], 2021; MedlinePlus, 2025).
Headaches do not feel the same in everyone. Depending on the type and cause, the pain may be:
- Dull, tight or pressing
- Sharp, throbbing or pounding
- Mild, moderate or severe
- Limited to one side or felt on both sides of the head
- Accompanied by nausea, vomiting, dizziness, visual changes, or sensitivity to light and sound
These differences are important because “headache” describes a symptom rather than one single disease. Some headaches are primary headaches, meaning the headache disorder itself is the main condition. Examples include migraine, tension-type headache and cluster headache. Others are secondary headaches, meaning the pain is caused by another condition or substance, such as an infection, head injury, medicine or medicine withdrawal (International Headache Society, 2018; MedlinePlus, 2025).
Medicine-related headaches are therefore classified as secondary headaches when there is adequate evidence that taking, overusing or withdrawing from a particular substance caused the pain (International Headache Society, 2018).
Why Can Medicine Cause a Headache?
There is no single explanation that applies to every medicine. Different medicines affect the body in different ways.
1. The medicine widens blood vessels
Some medicines cause blood vessels to relax and widen. This process is called vasodilation. Although vasodilation may be the intended treatment effect, it can activate pain-sensitive pathways and produce a throbbing or pounding headache (International Headache Society, 2018).
Nitrates, such as glyceryl trinitrate, also known as nitroglycerin, are clear examples. These medicines widen blood vessels to improve blood flow and relieve chest pain. Headache is a very common side effect, especially when treatment begins. The headache often improves after the body becomes accustomed to the medicine, but severe or persistent pain should be reported to a healthcare professional (National Health Service, 2023).
Medicines used for erectile dysfunction, including sildenafil, tadalafil and vardenafil, also affect blood-vessel relaxation. Headache, facial flushing, nasal congestion and dizziness may occur as side effects. Sildenafil must not normally be combined with nitrate medicines because the combination can cause a dangerous fall in blood pressure (National Health Service, 2026).
2. The medicine changes blood pressure
Some medicines can raise or lower blood pressure. A rapid or excessive fall in blood pressure may cause headache, dizziness, weakness, blurred vision or fainting. This may be more likely when treatment has just started, the dose has been increased, the person is dehydrated or several blood-pressure-lowering substances have been combined.
Medicines that lower blood pressure do not always cause headaches. In fact, some blood pressure medicines are used to prevent migraine. Whether a headache develops depends on the particular medicine, the dose and how the individual responds to it.
Other substances, including certain decongestants and stimulant medicines, may raise blood pressure. Very high blood pressure can be associated with headache, particularly when it is part of a medical emergency. However, ordinary mild or moderate high blood pressure often produces no noticeable symptoms.
3. The medicine affects chemical signals in the brain
Nerve cells communicate through chemical messengers called neurotransmitters. Medicines that alter serotonin, dopamine, noradrenaline and other chemical systems can sometimes produce a headache, especially when treatment begins or the dose changes.
These may include certain:
- Antidepressants
- Stimulants
- Medicines for attention-deficit/hyperactivity disorder
- Hormonal medicines
- Medicines used to treat neurological or psychiatric conditions
This does not mean that everyone taking these medicines will develop a headache. The effect depends on the specific medicine, its dose, other substances being used and the individual’s sensitivity.
4. The medicine changes hormone levels
Changes in hormone levels can influence headaches and migraine attacks. Medicines containing oestrogen or other hormones—including some contraceptives and hormone-replacement treatments—may improve headaches in some people but trigger or worsen them in others.
The timing of the headache can provide useful information. A headache may appear after starting hormonal treatment, after changing the dose or during the hormone-free days of a contraceptive schedule.
A person who develops a new migraine with aura while using hormonal treatment should obtain medical advice. Aura may include flashing lights, blind spots, numbness, tingling or difficulty speaking. This information may affect whether an oestrogen-containing treatment is suitable for that person.
Hormonal medicines should not be stopped or changed without discussing the situation with a qualified healthcare professional.
5. The medicine causes dehydration or loss of body salts
Some medicines increase urination, cause diarrhoea, lead to vomiting or reduce a person’s appetite. These effects can cause dehydration or disturb electrolytes such as sodium and potassium. Headache is a recognised symptom of dehydration and may occur with thirst, dry mouth, tiredness, dizziness and dark urine.
Medicines that may contribute include:
- Diuretics, sometimes called water tablets
- Laxatives
- Medicines that cause vomiting or diarrhoea
- Medicines that make eating or drinking difficult
Drinking more water is not always the correct response. People with heart failure, kidney disease or another medical condition requiring fluid restriction must follow their clinician’s advice.
6. The medicine affects sleep, muscles or vision
A medicine may contribute indirectly to a headache. For example, a medicine that causes insomnia may leave a person tired and more likely to experience a tension-type headache or migraine attack. Other medicines may cause anxiety, jaw clenching, muscle stiffness or temporary changes in vision.
These effects can place strain on the muscles around the head, neck, jaw or eyes. The resulting headache may come from the secondary effect rather than from the medicine acting directly on the head.
7. The medicine triggers an immune or inflammatory response
Some treatments activate or alter the immune system. Vaccines and medicines used for infections, cancer or autoimmune diseases may temporarily cause headache together with fever, tiredness or muscle aches. These symptoms can form part of the body’s immune or inflammatory response.
An analysis discussed by the American Migraine Foundation found that groups of medicines frequently linked with headache reports included vasodilators, antiretroviral medicines and some monoclonal antibody treatments. However, an association in a reporting database does not prove that a medicine caused a particular person’s headache. The illness being treated or another factor may be responsible (American Migraine Foundation, 2023).
8. The medicine interacts with another substance
A medicine may be tolerated when used alone but cause problems when combined with another medicine, alcohol, caffeine, herbal preparations or recreational drugs. An interaction can increase the amount of a medicine in the blood, strengthen its effects or raise the risk of side effects.
People should tell their doctor or pharmacist about everything they use, including:
- Prescription medicines
- Over-the-counter medicines
- Vitamins and minerals
- Herbal preparations
- Caffeine and energy products
- Alcohol
- Recreational drugs
A product described as natural is not automatically safe. Herbal products and supplements can cause side effects and interact with conventional medicines.
9. Too much headache medicine causes more headaches
One of the most confusing situations occurs when medicine taken to relieve a headache begins to make headaches more frequent. This condition is called medication-overuse headache, sometimes known as a rebound headache.
Medication-overuse headache usually develops in someone who already has migraine or another headache disorder and regularly uses medicine for immediate relief. When each dose wears off, the headache may return, leading the person to take another dose. Over time, this can create a cycle of increasingly frequent headaches and medicine use (American Migraine Foundation, 2024).
The risk is assessed according to the type of medicine and the number of days on which it is taken—not simply the number of tablets taken during one day. Commonly used diagnostic thresholds include:
- Simple pain relievers such as paracetamol, aspirin and non-steroidal anti-inflammatory medicines: use on 15 or more days per month for more than three months
- Triptans, opioids, ergot medicines and combination pain relievers: use on 10 or more days per month for more than three months
A diagnosis also generally requires headaches on at least 15 days per month in a person with a pre-existing headache disorder. Occasional and appropriate use of pain medicine is not the same as medication-overuse headache (American Migraine Foundation, 2024; International Headache Society, 2018).
Medication-overuse headache should be managed with help from a healthcare professional. Some medicines may be stopped immediately, while others—including opioids, barbiturate-containing products and certain sedatives—may need to be reduced gradually under medical supervision.
10. The medicine or substance is stopped suddenly
A headache may begin not when a medicine is taken but when it is reduced or stopped. This is known as a withdrawal headache.
Caffeine withdrawal is a common example. A person who regularly consumes coffee, tea, cola, energy drinks or caffeine-containing pain relievers may develop a headache after suddenly reducing or stopping caffeine.
Withdrawal from certain prescription medicines can also produce headaches, nausea, anxiety, sleeping difficulties or other symptoms. Depending on the medicine, stopping suddenly could lead to seizures, dangerously high blood pressure, severe anxiety or a return of the original illness.
A doctor or pharmacist should be consulted before stopping long-term medicine or changing its dose.
Is the Medicine Definitely Responsible?
Not necessarily. A headache that begins after taking medicine may suggest a connection, but timing alone does not prove that the medicine caused it. The American Migraine Foundation (2023) notes that the illness being treated, a pre-existing headache disorder or another factor may be responsible.
The headache could instead be caused by:
- The illness for which the medicine was prescribed
- Fever or infection
- Dehydration
- Hunger or missed meals
- Lack of sleep
- Stress or anxiety
- Caffeine withdrawal
- Migraine or tension-type headache
- Another medicine or interaction
- An unrelated medical condition
A connection becomes more likely when the headache begins after a medicine is started or its dose is increased, repeatedly appears after each dose and improves after the treatment is safely changed or discontinued.
Even in such cases, a healthcare professional should assess the full situation. A person should not stop prescribed medicine simply because a headache developed after taking it.
Why Does the Same Medicine Affect People Differently?
A side effect listed on a medicine leaflet is possible, not certain. One person may experience a headache while another person taking the same medicine does not.
Individual risk may be affected by:
- The dose
- How quickly the dose was increased
- Age and body size
- Genetics
- Pregnancy
- Liver and kidney function
- Dehydration or missed meals
- Other medicines and supplements
- Alcohol or caffeine consumption
- A history of migraine
- Other medical conditions
Some headaches improve within several days as the body adjusts to treatment. Others continue until the dose or medicine is changed.
What Should You Do If a Medicine Gives You a Headache?
Do not stop important medicine on your own
Suddenly stopping treatment can be more dangerous than the headache. This is particularly important with medicines used for epilepsy, high blood pressure, heart disease, mental-health conditions, blood clot prevention and long-term steroid treatment.
Contact the prescriber or pharmacist for advice. The healthcare professional may recommend monitoring the symptom, adjusting the dose or time of administration, changing the medicine or investigating another cause.
Check the label and information leaflet
Read the information supplied with the medicine. It may explain whether headache is a recognised side effect, how long it normally lasts and when medical attention is necessary.
Take the medicine exactly as instructed. Do not take an extra dose after vomiting or missing a dose unless a healthcare professional or the medicine instructions specifically advise it.
Keep a headache and medicine diary
A diary may help identify whether there is a consistent connection between the medicine and the headaches. Record:
- The name of the medicine
- The dose and time taken
- When the headache began
- Where the pain was felt
- How severe it was
- How long it lasted
- Other symptoms
- Food, fluid and caffeine intake
- The amount of sleep obtained
- Any pain medicine used
A doctor or pharmacist can use this information to assess possible side effects, interactions and other explanations.
Ask before taking another pain reliever
Taking a painkiller may seem like the obvious solution, but it is not always safe. The painkiller could interact with the original medicine or be unsuitable for someone with stomach ulcers, kidney disease, liver disease, asthma, pregnancy or blood-thinning treatment.
Frequent use of painkillers may also contribute to medication-overuse headache. A pharmacist or doctor can advise whether a particular pain reliever is appropriate.
Use simple supportive measures when appropriate
Depending on the person’s condition and professional advice, it may help to:
- Rest in a quiet place
- Drink an appropriate amount of fluid
- Eat regular meals
- Limit alcohol
- Maintain a regular sleep schedule
- Avoid driving if the headache occurs with dizziness or blurred vision
These measures should not replace medical assessment when the headache is severe, persistent or unusual.
When Should You Seek Emergency Medical Help?
Most medicine-related headaches are not medical emergencies. However, a severe or unusual headache can be a warning sign of a serious condition.
Seek emergency medical care if a headache:
- Begins suddenly and becomes extremely painful within seconds or minutes
- Is the worst headache the person has ever experienced
- Occurs with weakness, numbness or facial drooping
- Occurs with confusion, fainting or seizures
- Causes difficulty speaking, walking or maintaining balance
- Occurs with severe vision loss
- Comes with fever, a stiff neck, severe drowsiness or a new rash
- Follows a serious head injury
- Occurs with chest pain, serious breathing difficulty or an irregular heartbeat
- Appears with extremely high blood pressure and other serious symptoms
- Develops during pregnancy or shortly after childbirth and is severe or unusual
Emergency assistance is also necessary if possible anaphylaxis occurs. Warning signs include:
- Swelling of the lips, tongue, face or throat
- Difficulty breathing or wheezing
- Tightness in the throat
- Fainting or extreme confusion
- A widespread raised, itchy or blistering rash
Medical advice should also be obtained when a headache begins after starting a new medicine, continues to return, becomes progressively worse, lasts longer than expected or interferes with normal activities. New headaches in people over 50 or those with cancer or weakened immune systems should be evaluated promptly (MedlinePlus, 2025).
The Bottom Line
Some medicines cause headaches because they widen blood vessels, change blood pressure, alter brain chemicals or hormone levels, affect fluid balance, activate the immune system or interact with other substances. A headache can also result from using pain-relieving medicine too frequently or suddenly stopping certain medicines or caffeine.
A headache listed as a side effect does not necessarily mean that a medicine is dangerous. Similarly, a headache occurring after a dose is not proof that the medicine caused it. The timing, pattern, dose, accompanying symptoms, other medicines and the person’s medical history all need to be considered.
The safest response is to record what happened and discuss it with a doctor or pharmacist. Prescribed treatment should not be stopped or changed without appropriate professional guidance.
Disclaimer
This article is provided for general educational purposes only. It is not a substitute for diagnosis, treatment or advice from a qualified healthcare professional. Do not start, stop or change the dose of any medicine based solely on this information. Always consult a doctor or pharmacist about side effects, possible medicine interactions and persistent or severe headaches. Readers are encouraged to consult the original sources. For factual errors or necessary corrections, please contact us.
References
American Migraine Foundation. (2023, April 12). What medications are commonly linked to headache? https://americanmigrainefoundation.org/resource-library/medications-linked-to-headache/
American Migraine Foundation. (2024). What is medication overuse headache? https://americanmigrainefoundation.org/wp-content/uploads/2024/09/2203_AMF_Medication_Overuse_V5_Digital.pdf
International Association for the Study of Pain. (2021, September 9). Headache. https://www.iasp-pain.org/resources/fact-sheets/headache/
International Headache Society. (2018). Headache Classification Committee of the International Headache Society (IHS): The International Classification of Headache Disorders, 3rd edition. Cephalalgia, 38(1), 1–211. https://doi.org/10.1177/0333102417738202
MedlinePlus. (2025, October 27). Headache. U.S. National Library of Medicine. https://medlineplus.gov/ency/article/003024.htm
National Health Service. (2023, April 12). Side effects of glyceryl trinitrate (GTN). https://www.nhs.uk/medicines/glyceryl-trinitrate-gtn/side-effects-of-glyceryl-trinitrate-gtn/
National Health Service. (2026). Sildenafil (Viagra). https://www.nhs.uk/medicines/sildenafil-viagra/


