Two easy methods of preventing mold or mildew in a washing machine is to leave the washer door open or to remove wet loads of clothing as soon as possible after wash cycles. Running a hot water wash with bleach can also help prevent mold or mildew.
By leaving the washer's door open, the door frame and interior can fully dry between cycles. Caution must be exercised when doing this, however, as children or pets may climb inside an open washer. Be sure to use the correct detergent for the specific model of washer, especially high-efficiency models.
Higher volumes of suds can lead to mold. Thus, use powder detergent when possible, as these detergents foam less. In the same vain, do not use more than the required amount of detergent. Fabric softeners should be avoided, as they leave behind a film that mold can grow on. Dryer sheets or dryer balls are recommended as a substitute.
Regular drying and cleaning of the washer's door and gaskets can prevent mold as well. The inside of the door must be wiped dry, as well as underneath the gaskets with a towel, since mildew often forms in the folds of the gasket. A hot water cycle with bleach is also recommended to sanitize the washer.