At a glance
- Your immune system protects you from viruses, bacteria, and other things that can make you sick.
- Healthy habits—like getting enough sleep, eating well, and staying physically active—help your immune system work better.
- Healthy habits support your overall immune health, but they do not teach your body to recognize specific diseases.
- Vaccines train your body to recognize and fight specific diseases without the risks of getting a full-blown infection.
- Healthy habits and getting recommended vaccines work together to give your body more ways to protect you from serious illness.

Overview
Your immune system is your body's defense system.
Healthy habits, like getting enough sleep, eating well, and staying active, help your immune system do its job. But healthy habits alone can't teach your body to recognize and fight specific diseases.
That's where vaccines come in. Vaccines teach your immune system to recognize and defend against specific diseases. They give your immune system practice responding to germs that cause illnesses like flu, COVID-19, RSV, or measles. This helps your body respond more quickly if you are exposed later, without the risks of getting a full-blown infection.
Both healthy habits and vaccines matter. But the important thing to know is that they have different roles. Healthy habits support your overall health and immune function. Vaccines help your body recognize and fight specific diseases. Together, they can help lower your risk of serious illness.
Your yearly immune health checklist
Talk to your healthcare provider at least once a year about your overall health and recommended vaccines. Your doctor can help you understand which vaccines are right for you and how your overall health may affect your immune response. Ask your doctor about:
Which vaccines are recommended for you
Some vaccines, like flu vaccines, are recommended every year. Others, like RSV and shingles, may be recommended based on your age, underlying health condition, vaccination history, or other factors. Your doctor can help you make a vaccine plan to fit your needs.
How health conditions may affect your immune response
Health conditions like diabetes, heart disease, and obesity can affect how well your body fights infections or responds to vaccines12. Managing these health conditions can support your overall health and help your immune system work as well as possible.
Whether your medicines or treatments affect your immune system
Some medicines and treatments can lower the immune system's ability to fight infections or respond to vaccines. Your doctor can help you understand how a medicine or treatment affects your immune system and which vaccines are most important for you.
Your daily defense plan
Your daily habits have a direct impact on how well your immune system works. The healthy behaviors below can help support your immune health year-round.
Build your body's defenses
What you eat, how well you sleep, and how active you are all affect how your immune system works. These healthy habits help your body make immune cells, recover from daily stress, and recognize and fight infections better.
Eat healthy foods
Focus on protein (like chicken, fish, and beans), vegetables, fruits, whole grains, and healthy fats—these give your body the nutrients that can keep your immune cells working properly34.
Get enough sleep
Sleep gives your body time to recover and supports the immune responses that help fight infection. Most adults need at least 7 hours of sleep each night. Even losing a few hours can weaken your immune system's defenses and reduce how well vaccines work in your body56.
Stay physically active
Regular physical activity helps support your overall immune health by helping cells move through your body. It may also strengthen antibody responses after some vaccines78910. Aim for at least 150 minutes of moderate-intensity activity, or 75 minutes of vigorous-intensity activity each week9. Intensity and duration can vary based on your age or underlying health conditions. Talk to your doctor about options if you have any physical limitations.
Avoid smoking
Cigarette smoke damages the lungs and weakens your immune defenses that help the body fight respiratory infections1112. Quitting smoking can support your immune health and help your body respond to illness and vaccines better. Talk to your doctor about quitting resources.
Reduce your exposure to germs
While the healthy lifestyle behaviors above build your defenses from the inside out, these everyday actions help lower your chances of being exposed to germs in the first place.
Practice good hygiene
Washing hands and cleaning commonly touched surfaces can help keep you healthy and prevent the spread of respiratory infections. Wash hands with soap and water for at least 20 seconds. When soap and water aren't available, a hand sanitizer with at least 60% alcohol is a good backup.
Take steps for cleaner air
Respiratory diseases can spread more easily in indoor and crowded spaces. Opening windows, improving air ventilation, and gathering outdoors, when possible, can help lower the amount of germs in the air around you.
Keep your distance when other people are sick
Germs can spread during close contact. Putting some physical distance between yourself and someone who is sick can lower your chance of getting sick, too.
Know your risk
Immune systems can respond differently based on a person's age, underlying health conditions, and medicines or treatments. These factors may make it harder for the body to fight infection or respond to a vaccine. People with these risk factors may benefit from added prevention steps, timely vaccination, and early treatment.
Older adults
The immune system naturally weakens with age. These changes can make it harder to fight infections and may reduce the immune response made after vaccination12. If you're 65 or older:
Talk with your doctor about recommended vaccines
Older adults have a higher risk of complications from several respiratory illnesses. Vaccines against flu, pneumococcal disease, COVID-19, RSV, and other vaccine preventable diseases are especially important for older adults.
Keep moving
Physical activity can help you maintain strength, balance, and independence. It can also help support your immune function7.
Pay attention to sleep changes
As you age, changes in sleep patterns, underlying health conditions, pain, and medicines can make it harder to get enough rest. Getting enough sleep helps your immune system work well. Talk with a healthcare provider if sleep problems are affecting your health.
Make sure you're eating enough healthy food
Appetite, dental problems, medicines, and difficulty shopping or cooking can make it harder to eat well. Getting enough nutrients helps your immune system work well and supports your body's response to illness and vaccination2. Ask your doctor or a dietitian for help if needed.
Certain settings can also affect risk
People who may need extra protection
Some people may have a higher risk of severe illness or may not develop as strong an immune response to vaccination. You may need extra protection if you have certain underlying health conditions or take medicines or receive treatments that weaken your immune system. You may also need added protection if you are pregnant or care for a young child. Talk with your healthcare provider about vaccines and other steps that are right for you or your child.
You may need added protection if you or your child has any of the following:
Obesity, including visceral fat
Visceral fat is stored deep in the abdomen around internal organs. You cannot always tell how much visceral fat someone has by looking at them. Too much visceral fat can cause ongoing inflammation that may affect how the immune system works and responds to some vaccines1.
Underlying health conditions
Health conditions like diabetes, heart disease, and lung disease add stress to your body and make nearly every system work harder. This makes it harder for your body to fight infections.
Medicines or treatments that weaken the immune system
These can affect which vaccines are recommended, when you should receive them, and how well your body responds. Talk with your healthcare provider about what's right for you.
Pregnancy
The body goes through several changes during pregnancy. These changes affect how the immune system and other organs work. This can make respiratory illnesses more serious and increases the risk of complications. Talk with your healthcare provider about which vaccines are recommended during pregnancy.
Young children
Young children, especially babies, are still developing their immune defenses. Their smaller lungs and airways can also make respiratory infections more serious. If you're a parent or caregiver of young children, talk with their doctor about which vaccines and prevention steps are recommended to help protect your child.
This page was last updated on this date. Updates may include minor edits, image changes, or other modifications to page content.
The information on this page was last reviewed by subject matter experts to ensure accuracy.
- Immunosenescence: A Systems-Level Overview of Immune Cell Biology and Strategies for Improving Vaccine Responses - PMC
- Vaccination in the elderly: an immunological perspective - PMC
- Diet and Immune Function - PMC
- Western Diet and the Immune System: An Inflammatory Connection - ScienceDirect
- Module 2. Sleep and the Immune System | NIOSH | CDC
- A Narrative Review on How Timing Matters: Circadian and Sleep Influences on Influenza Vaccine Induced Immunity
- Effects of Exercise on Vaccine-induced Immune Responses - PMC
- Position Statement Part One: Immune Function and Exercise
- What Counts as Physical Activity for Adults | Physical Activity Basics | CDC
- Physical Activity Guidelines for Americans, 2nd edition
- Effects of Cigarette Smoke on the Immune System | Nature Reviews Immunology
- Effects of Cigarette Smoke on Immunity, Neuroinflammation and Multiple Sclerosis - ScienceDirect