Laundry in Washing Machine
Credit: Witthaya Prasongsin / EyeEm/Getty Images

We've all been there. You go to do a load of laundry, lift the lid (or open the door), and there's a smell. It's a bit musty and a bit moldy and a whole lot of frustrating. How can a machine that is regularly filled with soap and hot water and bleach, a machine that can make even the stinkiest socks smell like daisies, contain such a foul odor?

The problem is that while a washing machine may be many moms' favorite machine in the entire house, they are also a favorite of odor-causing bacteria. The water and warmth in a washing machine can be the perfect breeding ground for bacteria, mold, and mildew, which can all lead to a stinky washer. Luckily, it's pretty easy to prevent bacteria from growing and to fix the problem if your washing machine develops an unpleasant aroma.

Odors can also be due to poor drainage from the washer, which can cause the water to stagnate in the machine, which is the perfect environment for bacteria.

If you have a front-loading washer or a top-loading model, the easiest way to prevent making a stink (so to speak) is to simply leave the door or lid open for a few hours after washing a load of laundry. That will give any moisture left in the washer or the door gasket time to dry. Since moisture also likes to loiter in the detergent drawer, pull it out slightly to air dry any lingering wet spots.

WATCH: 7 Things You Should Never Put in the Washing Machine

It's also a good idea to get the clothes out of the washer as soon as possible after the cycle finishes. Wet clothes can jumpstart the build-up of mold and mildew by creating a damp environment, so getting both the clothes and the washer drying quickly can help prevent smells from developing.

According to the pros at Bob Vila, there are three step to getting your washing machine smelling fresh: scrub, sanitize, and deodorize. They lay out the process here, including taking an old toothbrush to the soap, softener, and bleach dispensers, using a Q-tip on the rubber gasket on a front load model, sanitizing with bleach, and deodorizing with vinegar. No one said washing machine cleaning would be easy! Alternatively, buy a washer with a cleaning cycle or check if your machine has one and you just never noticed it before (guilty!). The cleaning cycle is designed to do just what it says . . . clean your washer. It uses hot water and flushes mold and mildew out leaving your machine clean.