Ever experience pulling laundry out of the machine, excited to take in that glorious smell of freshly dried laundry only to be greeted with a stale and mildewy stench? What the heck?

You might be thinking, "Maybe my clothes were just that dirty." But it might just be that your machine needs a real cleaning. Yep, just like any appliance, it needs a good deep-clean from time to time to keep it working like new — and your laundry smelling as clean as it should. What you might be picking up on your clothes could be a buildup of bacteria and mold in your washer and dryer.

Cleaning your washer and dryer is easier than you think — just follow these 12 easy deodorizing tricks.

More: 12 Cleaning Products That Have a Cult Following

Step 1: Don't delay drying

Don't leave clean laundry in the machine after the load has finished washing — especially not overnight. With a warm, dark environment like a closed washing machine, bacteria and mold both thrive.

Step 2: Avoid the damp

Never put damp laundry in the washing pile. If you can't wash wet or damp clothes and towels immediately, pretreat as needed and then let them dry to keep them from getting smelly.

Step 3: Dry well

Thicker towels and heavy clothing such as jeans take longer to dry, so be sure to dry them thoroughly each time.

Step 4: Get a clothesline

Hang your laundry outside to dry. The sun can help keep mold at bay — just be sure to dry everything completely (even if it means some time in the dryer inside).

Step 5: Soften carefully

Avoid using liquid fabric softener in the washing machine, as some people have experienced a buildup of "gunk" from its use. (Vinegar is said to be a natural fabric softener.) If you do use store-bought fabric softener, dilute the mixture with water before adding it to the machine and realize that the softener can make laundry harder to dry.

Step 6: Try different washing machine additives

There are many different laundry additives you can try — get some suggestions on the next page. But be aware that these measures are guidelines only, and effectiveness will depend on many factors, including the size of the load, water temperature and the amount of water used, the origin of the bad smell, etc.

Next: Nontoxic/natural solutions

A version of this article was originally published in August 2009.

Step 7: Nontoxic/natural solutions

Try allowing each load of smelly laundry to presoak for at least 15 minutes in hot water using one of these additives per load to see what (and how much) works best for you: borax (about half a cup), vinegar (three-quarters a cup), lemon juice (about half a cup), baking soda (three-quarters a cup), hydrogen peroxide diluted to 3 percent (half a cup).

Step 8: Commercial cleaning products to try

Try running your stinky wash loads with the addition of one extra cleaning product at a time, such as OdoBan ($18.39 at Amazon), Simple Green ($8.47 at Walmart) or Pine-Sol ($3.79 at Target). Add only one-quarter cup of Pine-Sol — and only if you can handle the scent.

More: Cleaning Hacks for the Woman With Zero Extra Time

Step 9: Common household products — but beware

You can try using one-quarter cup of bleach (add it to the wash water and make sure it has been diluted significantly before adding smelly laundry and never use bleach with any other additive besides regular detergent). Another option is to add half a cup of ammonia to a load of laundry, but be sure not to use it with bleach to avoid creating dangerous fumes.

Step 10: Detergent with a bonus ingredient

Try a commercial laundry detergent, like Febreze ($8.84 at Walmart), that has an odor-removing additive.

Step 11: Go with hot water

Use hot water to wash loads that smell.

Step 12: Wash the washer

To help keep your smelly-laundry problem from returning, you may need to give your clothes washer a deep-clean of its own. Find out how to deodorize your smelly washing machine.