Washing machines are great, but they do require a bit of work to keep them clean and odor-free. Preventing odors from the drain trap under the Washing machine is simple enough, and makes your home so much better! If you use a front load washer, sometimes bad odors come from the drain trap under the washer. The drain trap should always be sealed with water, but when you use the dryer, sometimes the water evaporates, leading to little creepies and odors.
In order to prevent this, please keep turning on the water faucet a little even when you use only the dryer, or you can pour some water directly into the drain after the dryer finishes. Ideally speaking, cleaning the drain trap once a month is also effective.
To clean out the washing machine itself, add a cup of half baking soda and half distilled white vinegar to an empty load. If the smell does not go away, try a cup of bleach instead. Run a final load of just hot water to get the chemicals out and you should be good to go.
Image by: Matthew Paul Argall [Public domain]