Cleaning a dishwasher requires cleaning every individual part of the machine. Removing the racks, scrubbing off stains, scrubbing the racks and running a wash cycle while the washer is empty are the critical components of performing a thorough cleaning.
Start the cleaning by removing the racks and everything else that blocks access to stains in the washer. The next step is to scrub away the stains. One of the most effective ways to eliminate stains in a dishwasher is to use a mixture of equal parts vinegar and water or dish soap and a sponge or brush. Make sure to clean the drain grating as well, because debris often gets caught in the small nooks and crannies at the bottom of the machine. Use a toothpick or a small, sharp tool to remove food from the grating's holes.
The next step is to clean the racks and other accessories with the same solution used to clean the dishwasher. Due to the large size of the racks, it may be easier to clean them in a bathtub instead of a kitchen sink. Make sure to also clean the rubber seal of the dishwasher with a solution of 3 cups of hot water to 1 cup of either bleach or vinegar. It is important to clean the seal because its folds can catch stray pieces of food and even get moldy.
After everything has been rinsed and put back in the dishwasher, run the dishwasher on its hottest cycle with either vinegar, baking soda or lemon juice in place of normal dishwasher detergent. Every part of the dishwasher does not have to be cleaned at the same time, but it is wise to clean all parts at least once a month to keep things sanitary.