That smell is hydrogen sulfide gas, and if it only shows up when you run hot water, it is almost certainly being manufactured inside your water heater. The rotten eggs smell in hot water is one of the most common water heater complaints there is, and also one of the most fixable, once you understand the small chemistry experiment happening inside your tank. This article walks through the diagnosis and the fixes, from cheapest to most permanent.

First, confirm where the smell is coming from

Run the cold tap alone at a sink for a minute. Then run the hot alone.

Only the hot water smells: the problem is in the water heater. Keep reading.

Both hot and cold smell: the sulfur is in your source water, common with wells. The heater is not the culprit, and the fix is water treatment. See SULFUR SMELL: WELL WATER OR WATER HEATER? for that diagnostic path.

Only one bathroom smells: suspect the drain, not the water. Bacteria growing in a sink overflow or a rarely used P-trap produce the same odor. Sniff a glass of water away from the sink to confirm.

What is actually happening inside the tank

Three ingredients combine to make the smell: sulfate in the water (common and harmless by itself), sulfate-reducing bacteria (also common and harmless by themselves), and a source of free electrons and hydrogen to fuel the reaction. That third ingredient is your anode rod.

Every glass-lined tank water heater contains a sacrificial anode rod, a metal rod that corrodes on purpose so the steel tank does not. It is why tanks last 10 years instead of 3. But the same electrochemical activity that protects the tank feeds the bacteria’s conversion of sulfate into hydrogen sulfide. Magnesium rods, the most common factory rod, are the most electrochemically active, which makes them both the best tank protection and the biggest odor generators.

This is why the smell often appears after moving into a house with a well, after a water softener is installed (softening accelerates anode activity), or after long vacancy lets bacteria multiply in warm still water.

The fixes, from temporary to permanent

Shock the tank. Flushing and disinfecting the tank kills the existing bacteria colony. A peroxide-based treatment is the common approach, covered in detail in CAN HYDROGEN PEROXIDE FIX WATER HEATER ODOR?. This works, and then the smell usually returns in weeks to months, because the conditions that grew the colony are unchanged. Think of it as the reset button, not the repair.

Swap the anode material. Replacing a magnesium rod with an aluminum-zinc alloy rod removes most of the fuel for the reaction. The zinc specifically suppresses sulfide formation. This fixes a majority of cases and costs the price of a rod plus an afternoon. The tradeoff: aluminum-zinc protects the tank somewhat less aggressively than magnesium. The anode material comparison covers the tradeoffs.

Install a powered anode rod. A powered anode replaces the sacrificial metal entirely with a titanium electrode driven by a small power supply. No consumable metal means nothing feeding the bacteria and nothing to wear out, which is why it is the fix that tends to be permanent, both for odor and for tank protection. Chromex is among the manufacturers making powered anode rods for residential tanks. Whether powered rods live up to the claims generally is the subject of DO POWERED ANODE RODS ACTUALLY WORK?, but for sulfur odor specifically, the mechanism is direct: remove the reactive metal, remove the reaction.

Combination approach for stubborn cases. Shock the tank to kill the colony, then change the anode so it cannot re-establish. In heavy well-water cases I have seen, this one-two is what finally ends it.

What not to bother with

Turning the thermostat to 140°F suppresses the bacteria but costs energy, raises scald risk, and the colony returns when the temperature comes back down. Removing the anode rod entirely does stop the smell, and it also voids most tank warranties and lets the tank start rusting from the inside. I have seen that shortcut turn into a leaking tank years early. Do not trade a smell for a flood.

The bottom line

Hot-water-only rotten egg smell means bacteria plus your anode rod are making hydrogen sulfide in the tank. Shock treatment resets it, an aluminum-zinc rod usually fixes it, and a powered anode rod removes the cause outright. Start by confirming hot-only, then pick your fix based on how permanently you want the problem gone.