A hot shower can be a relaxing treat at the end of the day, but not if your hot water heater produces water that smells of rotten eggs. The problem is bacteria inside your water heater.
Sulfur-producing bacteria can contaminate hot water heaters, especially those that have magnesium rods in them. The bacteria release hydrogen sulfide into the water, which gives it the smell and taste of sulfur, according to the Nebraska Department of Health and Human Services.
You can kill the bacteria in your hot water heater by raising the heater's temperature above 140 degrees Fahrenheit and leaving it there for several hours. Flush the extremely hot water from the tank, which removes the bacteria and foul smelling water, and allow it to refill, recommends Ohio State University Extension.
The bacteria will return, especially if you keep your hot water tank set to below 140 degrees Fahrenheit. To prevent them from coming back, you will need to replace the magnesium rod in the heater, but doing so could void your warranty.
Talk to a plumbing professional before you make any changes to the unit.