Foot odor comes in four main varieties: sweaty, cheesy, vinegary and cabbage-y. That’s because of chemicals produced by the bacteria down there.

Methanethiol is a key component in the flavor of cheddar cheese. Acetic acid is a result of sugar fermentation — and is better known as vinegar. Byproducts associated with rot, such as propionic acid and butyric acid, can leave feet smelling like rancid cabbage. The most common foot-related chemical, isovaleric acid, is responsible for the smell we call “sweaty.” Our noses are up to two thousand times more sensitive to this chemical than the others, and many of us can recognize it even at the slightest concentration.

Foot Inhabitants

Only a few types of bacteria have learned to enjoy inhabiting the foot. Most of these are friends, despite their smell, and our lifelong partners. At any given time, we have hundreds of millions of them living happily on our feet, which they regard as the perfect environment: warm, moist, and offering an unending supply of nutrients in the form of dead skin cells.

They adhere to us shortly after birth and stay with us for the rest of our lives. They are also a necessary part of keeping our feet healthy.

The bacteria release oils that help keep skin soft and enzymes that break down dead skin and prevent dry, flaky areas, as well as calluses. Our foot friends also provide a barrier against microbial pathogens. Our bacteria are very territorial, and they have mechanisms to ward off disease-causing visitors. They produce a number of defensive molecules, called antimicrobial peptides, which seek out and kill any invaders. These molecules are similar to antibiotics, but pathogens cannot develop resistance to them.

Smells Healthy

To have the healthiest feet, we need these good microbes working hard for us. It can be difficult to assess their presence with our eyes, but we can always perform a smell test to ascertain if our feet are in good microbial hands. When we have a smell that is familiar to us — even if it isn’t pleasant — we can be sure we’re maintaining the same microbial population.

If that smell changes, though, and becomes more bread-like, grape-like or acrid instead of sour, it can be a warning sign. There are several infections, mainly fungal, which can take residence on the foot and start to attack. Unlike our microbial flora, which prefer to feed off dead skin cells, these intruders want to eat something fresh. Without proper treatment, these pathogens can cause rashes, breaks in the skin and larger wounds. Should this happen, you may require medical attention.

Balancing Bacteria

While the smell of your feet is usually a sign of your overall health, it might not do wonders for your social life. Thankfully, there are ways to keep the friendly bacteria happy while still keeping scents to a minimum. One option is to use talcum powder or charcoal inner soles. They both absorb the smelly chemicals and prevent them from dispersing in the air.

While they won’t make your feet smell nice, they can keep your shoes from accumulating noisome chemicals.

There are other naturally derived compounds — including citral, geraniol and limolene — that are known to help improve that familiar foot smell. These chemicals shift the way the bacteria make by-products, inhibiting isovaleric acid from being produced in the first place. They can be found in several common foot-care products available in drugstores.

Excerpted from The Germ Files: The Surprising Ways Microbes Can Improve Your Health and Life (And How To Protect Yourself From the Bad Ones) by Jason Tetro. Copyright © 2016 Jason Tetro. Published in Canada by Doubleday Canada, a division of Penguin Random House of Canada Limited. All rights reserved.