Cloth Diaper Washing Guide

Are you confused about laundering your reusable diapers? I'm here to help you out. The internet is full of advice, some of which is good and some is outright bad. Here is my favorite advice though, take it all with a grain of salt, even what I say. Please note though, it is not necessary to weigh your diapers, measure your machine, or fill out a worksheet to get your cloth diapers clean. This info is geared towards beginners and established cloth diaper users. There is a lot here but I believe even the newest cloth user deserves complete information.

 

There are some steps we need to take to launder our diapers.

First we need to remove any poop if baby is eating solids OR if baby is on a liquid diet but their poop is thick. The washer will have trouble removing waste if baby has started to eat solids or if their poop isn't runny. If baby is breastfed, you can likely skip this step.
Second a prewash is in order! This is a wash cycle that can remove a majority of the debris and soil so that the next step can actually clean your diapers. I recommend an actual wash cycle rather than a prewash setting. Sometimes prewash settings don't do what you want them to do, which is a wash and a rinse. Some say to skip detergent for this step, I recommend using some!
Third time for the main wash! This is the cycle that really gets those diapers clean. For this cycle you'll want to choose a cycle that is long, heavy duty, and hot. Since the majority of pee and poop got taken care of in the prewash, this cycle can really do it's job.
Fourth an extra rinse can really be your friend to ensure the soil is rinsed away and that there is no residual detergent left behind. If there is any soil or detergent left behind your cloth diapers aren't truly clean, and if chronic it can lead to rashes, irritation, and buildup. Some will not need an extra rinse if the washer does a good enough job rinsing.

Components

Think of these components like parts that work together. When one component is weak, others need to be stronger. If you have too many weak components in your cauldron… ahem washing machine, it won't be cleaning your diapers as well as it could.
Agitation (mechanical action) is when your items rub together in your washer to get clean. Please note that using the deep fill setting or more water does not equal more agitation, it could mean less. The same is true for “bulking" your load (where you add additional items to the load) or using agitator balls/jacks. Correct agitation is individual to what is happening inside your machine, you can't improve agitation if you don't know which direction to go. 
For top loaders, a diaper to water ratio largely determines agitation. If you have way too much water, or not enough diapers you will have "soup” and they will be much too free flowing to rub together. If you have too many diapers, or not enough water, you will have "chili” and your diapers won't have enough water to agitate.
Surfactants (chemical action) are like a little stick, one end grabs water and the other end grabs soil. It allows gunk to slip out as the washer drains. Surfactants also disrupt and damage, or even kill pathogens. Read more on detergents below!
Heat is a catalyst to the chemical action and it helps kill pathogens. Heat makes molecules move more quickly. At higher temperatures, the increased speed and energy of molecular movement helps remove soil and debris from the fabric more effectively.
Water is essential to allow the surfactants to do their job and slip away with the soil. Without adequate water and rinsing, the surfactants with the soil will be left behind in the fibers. Water allows the soil to sort of be diluted, it just makes it easier for the gunk to leave your cloth diapers and make it's way down to your septic tank or sewage system.
If your cloth diapers are not getting clean, one of the ingredients in this recipe are probably too weak or there is something else at play.
Here are a few factors that may impact the ease of washing.
-Time between washes. If you go a longer time between washes, the soil and the bacteria and ammonia multiply and essentially get dirtier which can make them harder to clean. If you are going more than 3 days between loads but the rest of your wash routine seems great, consider washing sooner. Washing about every two days is ideal! When you go longer between washes the ammonia in baby's pee can even damage your diapers.
-Length of cycle. The amount of time a wash cycle runs plays a part in how clean your diapers get. If you've had a top loader and front loader, you may have noticed that front loaders have longer wash cycles. This is because they use less water so they need to compensate. If you are having trouble with your wash routine.. but your components seem just fine, try using a longer wash cycle. Check your manual if you don't have a digital screen to tell you the length.

Vinegar

You may have heard that vinegar can eat the gaskets in your washing machine, or damage your cloth diapers. It is acidic, but I do not believe this is common when it is diluted into a rinse cycle. I encourage you to do some digging and come to your own conclusion based on how you interpret the risks and benefits.
Here's how I might suggest it's use if you take the risk; ¼ cup of vinegar in the fabric softener compartment can act as a rinse aid. Vinegar is acidic, and can bring down a higher pH that detergent encourages. 
Here's what NOT to do. 
Do not mix vinegar with bleach, peroxide, oxo clean etc. this can be dangerous.
Do not mix baking soda and vinegar, they just neutralize one another.
Don't stick vinegar in with your detergent during a wash cycle, vinegar interferes with detergent and they work against one another, basically.

Fabric softener, scent beads, and dryer sheets

Not good under any circumstances. These products coat fibers with a waxy type of substance, which not only can make your absorbency repel but it can also be a residue that soil and bacteria stick to. It's also not wise to use things to make your laundry smell good, if it is clean it should smell good enough. It can interfere with you being able to accurately smell your diapers and determine if they are clean or not.

Drying

Hanging pocket diapers should not damage their elastics. This idea may have been conceived when some pocket diaper brands had elastics that already were not springy and would relax easily.
Anecdotally, hanging my pockets has not led to their elastics relaxing. Do not pull on elastics while they are warm.
The low heat setting on your dryer will likely be preferable. High can damage your diapers, and medium heat has the potential to cause undue wear depending on how hot it gets.
If you line dry your items and find they are a tiny bit stiff that is normal, a quick tumble dry on no heat or air fluff can help. If they are incredibly crunchy, investigate possible mineral or detergent buildup.

Temperature

High heat will cause elastics, spandex, and the polyurethane laminate to wear prematurely. Temperatures of about 120° and above could be problematic, if your hot water heater is set higher than that, consider opting for a warm water setting.

Detergents

Detergent will contain a chemical surfactant, some are petroleum derived and some are plant derived. Surfactants grab soil in the wash cycle, and then rinse away as your washer drains and during the rinse cycle.
Soap is different from these chemical surfactants because soap leaves a residue behind called soap scum. Soap scum is hard for a washing machine to remove, and is only recommended for hand washing situations. We do not want soap scum in our cloth diaper fibers because soil, bacteria, and minerals will stick to it. Cloth diapers are not clean when they have soap scum in them, basically. The fibers should have absolutely nothing on them at the end of the laundering process. Everything should easily rinse away and soap interferes with that. I don't like things that interfere with your diapers getting clean. If you are absolutely adamant about needing to use some sort of all natural soap instead of a detergent, you basically need to be hand washing for it to work. That option can be manually laborious but it is a viable option.
Do you need enzymes? I don't think so. Based on the information I have seen, enzymes can help lift staining. It is frequently claimed in the cloth diaper community that you need enzymes to properly break down human waste. I don't want to break anything down, all I need to happen is for the surfactants to grab it and go. The goal is to remove, not break down. Enzymes might enhance cleaning, but I feel that a good wash routine does not require enzymes.

Common questions

Can formula fed baby poop go in the wash machine?
Probably, but it has more to do with the consistency than what baby ate. Thick poo can't really get dissolved into the water very well. Runny poo gets dissolved easily.
But formula poop isn't water soluble!!
Neither is the gunk my husband brings in on his jeans after working in the garage or doing yardwork. That's what the surfactants in detergent are for. Surfactants emulsify things that aren't water based! It takes care of sand, dirt, and little hunks of grass too. I'm not sure where the “breastfed baby poop is water soluble” thing started but if I had to guess, it probably has some minerals and fat in it too. Use your judgement. 
Why do some of my diapers smell bad but others smell clean?
Many factors can affect smells. Polyester can hold on to stink, cotton can smell musty easier. Items with more layers and higher GSM (a measure of how heavy a fabric is) can be harder to launder. Your was routine needs to be catered to your hardest to wash items, alternatively you can toss the lone stinky item in with the next main wash. If you have a whole stash of flats but you have a few high GSM fitteds, you'll have to keep in mind that the high GSM fitted might need more attention than a flat does.
Do I really need a prewash?
Yeah, I really don't recommend skimping on this step. 
What about stripping?
Stripping should almost never ever be necessary if your wash routine is working. If you find that your diapers are stinky or causing a rash, a strip could be a bandaid or not even work. You really want your diapers to get clean every time, rather than allow them to get dirtier and dirtier before finally deciding to strip. If you feel like you occasionally need a deep clean this can indicate that something in your wash routine is weak, your diapers should be deeply and completely cleaned every time.