Leave the lid open between uses. Air-drying will curb mildew growth.
Pop in a bleach-free washer cleaner (like Affresh; $10 for five, walmart.com) once a month to blast away odor-causing residue. Run the machine empty on a hot cycle.
Make sure that your washer is level. Otherwise vibrations can damage your floor and prematurely wear out key components, like the shock absorbers and the tub bearings. (Plus, there's that terrible noise.) Place a level on top of the machine and adjust the feet, which typically screw up and down, accordingly. If this doesn't help, beef up the floor with a 3/4-inch-thick piece of plywood that's a little larger than the machine's base. It will help absorb vibrations.
Washers typically come with black rubber hoses, which can blister and tear over time, causing a flood. Replace them, even if they look fine, with sturdier stainless-steel ones. "I tell everyone to do this because the steel ones will live as long as the washing machine, but rubber hoses typically last only two or three years," says Chris Hall, the president of RepairClinic.com. "All you need is a pair of pliers." (Try GE four-foot stainless-steel Universal Washer Hoses; $23 for two, homedepot.com.)