Odors coming from the shower drain may be caused by a build-up of biofilm in the pipes. Another possible cause is a lack of water in the p-trap that allows smells to come back up the drain.
Commonly, a collection of body oils, bacteria, shampoo, soap residue and water lead to smelly shower drains. This biofilm can build up in the vertical pipes below the drain or in the U-shaped p-trap that is designed to hold water. Cleaning the drain and pipes with commercial drain cleaners or soap and water often removes the smell. A pipe clogged with hair can also lead to trapped biofilm, which may cause an odor. Removing the clog generally stops the smell.
A p-trap is designed to hold a small amount of water that blocks sewer gases from coming up the drain. Drains that smell like sewage usually signal a p-trap problem. If there is a leak and the p-trap isn't holding water properly, the gases and odors can travel back up the pipes and out of the drain. In less commonly used showers, the water in the p-trap may evaporate, allowing gases to creep out. To solve this problem, simply run water in the shower to fill the p-trap again.