If a washing machine starts to develop a strong odor, there are a number of techniques which can be used to get rid of the smell, and to prevent the buildup of odor problems in the future. There are also some steps which people can take to avoid getting a smelly washer in the first place, including following manufacturer's directions very carefully, especially with high efficiency washers, which can start to smell very unpleasant if the wrong detergents are used.
Washers become stinky as materials build up behind the washer drum. This can include a layer of scum from incompletely cleared detergents, along with mold, pet hair, and other detritus from clothes and towels washed in the washer. If a washer starts to get smelly, it is a good idea to take out the washer drum to clean thoroughly behind it, paying special attention to the filter trap. Often, materials get trapped in the filter, making it hard for the washer to drain, and a smelly washer is the result.
Once the area behind the drum and the filter trap have been cleaned, a hot load without any laundry should be run with baking soda and vinegar or bleach to clean out the washer and bring back a fresher scent. There are also commercial products available for smelly washers, some of which run with empty loads, and some of which run with towels. However, a commercial cleaning product for a smelly washer will usually not be effective unless the area behind the drum has been cleaned to remove buildup.
Preventing a smelly washer starts with determining whether or not household water is soft or hard. Water which is extremely hard can interfere with the action of detergents, causing buildup, and it may make it necessary to add a water softener to the washing machine. If the household water is about average, people may find that it helps to run smaller loads of laundry, and to periodically run an empty hot load with vinegar or bleach to scour out the washing machine. A smelly washer can also be prevented by cutting down on detergent use.
Laundry should also not be left in the washing machine, as this can encourage mold to develop, and the washer should be left ajar for ventilation. For people who are concerned about small children and pets, the door to the laundry room can be kept closed, and it's a good habit to check the washer and dryer before running a load anyway.