Odors in drains can be both offensive and alarming. Drain odors are caused by residue like hair and food. This residue doesn't always get flushed down when the water is run, especially if it is greasy, and grows bacteria and sometimes mold. Household bleach is an effective deodorizer. It kills odor-causing bacteria and can also dissolve some debris. Use it either when drains are already starting to smell or as a preventative measure.
Run hot water down the drain for a minute or two. This removes any small particles that are in the drain so they don't get in the way of the bleach.
Pour 1 cup of bleach down the drain, trying to pour it around all edges of the drain so it touches the sides. Wait for the smell of the bleach to dissipate.
Pour another cup of bleach down the drain if the odor persists. Wait for the smell to dissipate. If the smell is still there, you need to take other measures, like calling a professional.
Some drains have odors because of backed-up sewage. This problem requires a plumber.
Never mix ammonia and bleach -- it creates toxic fumes.
Use bleach in a well-ventilated area. Wear gloves when handling bleach if you have sensitive skin.