It’s been a long, wet winter. Everybody has got colds, and now we are braced for a coronavirus epidemic. Boosting our immune system has rarely felt more urgent, but, beyond eating more tangerines and hoping for the best, what else can we do?

Sheena Cruickshank, a professor of immunology at the University of Manchester, has a “shocking cold” when we speak at a safe distance, over the phone. To know how to take care of your immune system, she says, first you need to understand the weapons in your armoury – a cheeringly impressive collection, it turns out.

“When you come into contact with a germ you’ve never met before,” she says, “you’ve got various barriers to try to stop it getting into your body.” As well as skin, we have mucus – “snot is a really important barrier” – and a microbiome, the collective noun for the estimated 100tn microbes that live throughout our bodies, internally and externally. Some of these helpful bugs make antimicrobial chemicals and compete with pathogens for food and space.

Beneath these writhing swamps of mucus and microbes, our bodies are lined with epithelial cells which, says Cruickshank, “are really hard to get through. They make antimicrobial products including, most relevant to coronavirus, antiviral compounds that are quite hostile.”

If a pathogen breaches these defences, it has to deal with our white blood cells, or immune cells. One type, called macrophages, inhabit all our body tissue and, says Cruickshank, “have all these weapons ready to go, but they’re not terribly precise”. They report to the cleverer, adaptive white blood cells known as lymphocytes. They are the ones that remember germs, “so if you meet that germ again,” says Cruickshank, “they’ll just deal with it probably without you even knowing. That’s when you’ve got immunity and is the basis of vaccination. It’s trying to bypass all the early stuff and create the memory, so you don’t have to be sick.”

Our immune systems may have blind spots. “This might mean that our immune response doesn’t recognise certain bugs,” she says, “or the bugs have sneaky evasion strategies. Personally, my immune system is not necessarily very good at seeing colds.” But a healthy lifestyle will ensure your defences are as good as they get.

Seeing as our bodies contain more cells belonging to microbes, such as bacteria and yeasts, than human ones, let’s start with the microbiome. “We live in a symbiotic relationship with our gut bacteria,” says Prof Arne Akbar, the president of the British Society for Immunology and a professor at University College, London. “Having the right ones around, that we evolved with, is best for our health. Anything we do that alters that can be detrimental.”

Not only do our microbes form protective barriers, they also programme our immune systems. Animals bred with no microbiome have less well developed immune responses. Older people, and those with diseases that are characterised by inflammation, such as allergies, asthma, rheumatoid arthritis and diabetes, tend to have less varied gut microbiomes.

To feed your gut flora, Cruickshank recommends “eating a more varied diet with lots of high-fibre foods”. Being vegetarian isn’t a prerequisite for microbiome health, but the more plant foods you consume, the better. “The microbiome really likes fibre, pulses and fermented foods,” she adds.

Kefir yoghurt and pickles such as sauerkraut and kimchi are among the fermented delicacies now fashionable thanks to our increasing knowledge of the microbiome. But the evidence for taking probiotic supplements, she says, “is mixed”. It’s not a dead cert that they will survive the journey through your digestive tract, or that they will hang around long enough if they do. “It’s more effective to change your diet,” says Cruickshank.

The skin microbiome is important, too, but we know less about it. High doses of ultraviolet light (usually from the sun) can affect it negatively, weakening any protective functions (as well as triggering immune suppression in the skin itself). Overwashing with strong soaps and using antibacterial products is not friendly to our skin microbiomes. “Combinations of perfumes and moisturisers might well also have an effect,” says Cruickshank.

To be immunologically fit, you need to be physically fit. “White blood cells can be quite sedentary,” says Akbar. “Exercise mobilises them by increasing your blood flow, so they can do their surveillance jobs and seek and destroy in other parts of the body.” The NHS says adults should be physically active in some way every day, and do at least 150 minutes a week of moderate aerobic activity (hiking, gardening, cycling) or 75 minutes of vigorous activity (running, swimming fast, an aerobics class).

The advice for older people, who are more vulnerable to infection, is to do whatever exercise is possible. “Anything’s better than nothing,” says Akbar. But a lifetime’s exercise could significantly slow your immune system declining with age. In 2018, a study by University of Birmingham and King’s College London found that 125 non-smoking amateur cyclists aged 55 to 79 still had the immune systems of young people.

The other side of the coin, says Akbar, “is elite athletes who become very susceptible to infections because you can exercise to a point where it has a negative impact on your immune system.” This problem is unlikely to affect most of us unless, says Cruickshank, “you’re a couch potato and suddenly try and run a marathon, this could introduce stress hormones and be quite bad for your immune system”.

One of the many happy side-effects of exercise is that it reduces stress, which is next on our list of immune-boosting priorities. Stress hormones such as cortisol can compromise immune function, a common example of which, says Akbar, is when chickenpox strikes twice. If you have had it, the virus never completely goes away. “During periods of stress,” he says, “it can reactivate again and we get shingles.”

Forget boozing through the coronavirus crisis, because heavy drinking also depletes our immune cells. “Some studies have suggested that the first-line-of-defence macrophages are not as effective in people who have had a lot of alcohol,” says Cruickshank. “And there’s been suggestions that high alcohol consumption can lead to a reduction of the lymphocytes as well. So if the bug gets into you, you’re not going to be as good at containing and fighting it off.”

Cruickshank says that vitamin D has become a hot topic in immunology. “It is used by our macrophages, and is something that people in Britain can get quite low on in the winter.” Necking extra vitamin C, however, is probably a waste of time for well-fed westerners. It’s not that vitamin C isn’t crucial to immune function (and other things, such as bone structure). “All the vitamins are important,” says Cruickshank, “but vitamin C is water soluble, it’s not one that your body stores.” Eating your five a day of fruits and vegetables is the best way to maintain necessary levels.

Exercising and eating well will have the likely knock-on effect of helping you sleep better, which is a bonus because a tired body is more susceptible to bugs. One study last year found that lack of sleep impaired the disease-fighting ability of a type of lymphocyte called T cells, and research is demonstrating the importance of our natural biorhythms overall.

Janet Lord, a professor at the University of Birmingham, recently showed that vaccinating people in the morning is more effective than doing so in the afternoon. “Your natural biorhythms are, to some extent, dictated by sleep,” says Akbar. “If you’ve got a regular sleep pattern, you have natural body rhythms and everything’s fine. If they go out of kilter, then you’ve got problems.”

The seriousness of an infection largely depends on the dose you are hit with, which could in turn depend on how contagious the carrier is when they cough near you. “We’re constantly exposed to germs, and we only get sick from a handful of those,” says Cruickshank.

If you’re reasonably young and healthy, says Akbar, the mild benefits you may achieve from being extra good probably won’t fend off a severe dose of coronavirus or flu. The likely scenario if you catch the infection is, he says, “you’ll be sick for a while and you will recover”.

From a public-health perspective, when nasty viruses such as coronavirus are doing the rounds, Akbar’s priority is not boosting already healthy people’s immune systems, “but protecting the vulnerable people. Older people don’t respond that well to the flu jab, though it’s better for them to have it than not. It’s a general problem of immune decline with ageing.”

When we get older, he says, the barrier function in the gut doesn’t work that well, “so you have something called leaky gut syndrome, where bugs creep into our bodies causing mild infections”. This causes inflammation around the body, as does the natural accumulation of old “zombie” cells, called senescent cells, and inflammation compromises the immune response.

Akbar is working on developing drug treatments to reduce inflammation in older people but they are a way off yet. Age 65 is when, medically, one is considered older, “but that’s arbitrary”, says Akbar. “Some old people might get problems much earlier. And there are older people who are totally healthy.”

“In terms of coronavirus,” says Cruickshank, “it’s mostly spread by droplet transmission, as far as we can tell, so the biggest thing is hygiene.” So wash your hands, and sneeze and cough into tissues, she suggests, between sniffles. No one can completely avoid getting sick, not even top immunologists.