In order to keep a watertight seal, your front load washer comes equipped with a pliable rubber door gasket. Unfortunately, these seals, while good at keeping water in, are notorious for growing mold or mildew if not frequently cleaned. If your door seal has blackened beyond what cleaning can fix or is old and damaged, it can be replaced.
Start this repair by unplugging your washer and disconnecting it from the water. This is for safety and because you may require quite a bit of disassembly to get to the door gasket. Once done, you will want to consult your owner’s manual to ascertain how to remove the front of your washer. It is different on many models, but in most cases, you will need to unthread the screws that secure the door, remove that, then either remove the top of the washer first or move on to removing the front panel. In models where you cannot remove the front, you will have to work in the area immediately around the door seal.
Once you have access to the seal, start by peeling back the sides and removing the retaining band around the exterior. Now you will be able to peel the seal itself away from the washer. Be sure to go slowly and inspect if your washer has any clips that need to be released as you go.
Before installing the new seal, clean the area underneath the old seal thoroughly and let dry. Your new door gasket will come with either lubricant or sealant that will need to be applied as per directions. When lining up the new door gasket, be sure to line the drain holes up with the actual drain in the door. Once the retaining band is back on, flip the seal lips over it and you can begin reassembly.
Here is a quick example from Fred’s Appliance Academy of replacing a bellow on a Frigidaire Front Load Washer.