There's a metal rod hanging inside your water heater whose entire job is to rot so the tank doesn't. It's called the sacrificial anode, and it's the single most overlooked reason tanks die early. Left alone, the rod dissolves completely, and then the corrosion that was eating it starts eating the steel tank instead. Swap it before that happens — a $25 part and under an hour of work — and you can add years to a heater that would otherwise be on the clock.
SHORT VERSION
Cut power/gas, close the cold supply, drain a couple gallons, and break the hex head loose with a 1-1/16" socket and an impact wrench. Pull the old rod — use a segmented rod if the ceiling's low — tape the threads on the new one, tighten it in, refill and purge the air. Check the rod every 3–5 years; replace once the core wire shows.
What the anode actually does
The inside of a tank is glass-lined steel, but that lining always has tiny gaps, and bare steel plus hot water plus minerals equals rust. The anode rod is made of a metal — usually magnesium or aluminum — that corrodes more readily than steel. Sitting in the same water, it draws the corrosion to itself and away from the tank walls, a bit of chemistry called cathodic protection. As long as there's anode left to give, the tank is protected. When the anode is gone, the clock on the tank starts.
This is why a heater can fail at eight years or run past fifteen depending on one $25 part nobody thinks about. Two things tell you it's time to look: rusty or off-color hot water, and a rotten-egg sulfur smell on the hot side. Either one is worth pulling the rod to check.
Tools you'll want
None of this is exotic, but one tool makes or breaks the job: the hex head on the anode is often torqued in hard at the factory and seized with years of corrosion. An impact wrench turns a fight into a two-second break.
A 1-1/16" socket
The standard anode hex size. A six-point socket grips better than twelve-point on a tight head.
An impact wrench or breaker bar
An impact wrench is worth borrowing or renting for this alone. With a breaker bar you may need a helper to keep the tank from spinning, and a cheater pipe for leverage.
A garden hose and thread tape
The hose drains a few gallons off the top. Thread seal tape goes on the new rod so it seals and comes out easier next time.
The replacement, step by step
Cut power or gas and shut the water
Breaker off for electric, control to pilot/off for gas. Close the cold-water inlet valve on top of the tank so it can't refill while you work.
Relieve pressure and drain a few gallons
Open a hot tap somewhere in the house to break the vacuum, then run a couple gallons out the drain valve to drop the level below the anode port. You don't need to empty the tank.
Find the hex head
It's on top of the tank, sometimes hidden under a plastic cap you pry off. On some heaters the anode is built into the hot-water outlet — if you don't see a separate hex head, that's why.
Break it loose
Socket on the head, and turn counter-clockwise. This is where the impact wrench earns its keep. With a breaker bar, brace the tank so the whole heater doesn't rotate.
Pull the old rod
Unthread it and lift straight up. If there isn't 40-odd inches of clearance above the tank, this is where a rigid rod gets stuck — bend the old one as it clears, and plan to put a segmented rod back in.
Install the new rod
Wrap the threads with thread seal tape, lower the rod in, and tighten firmly. Snug and sealed, not gorilla-tight — you want to get it out again in a few years.
Refill and restore power
Close the drain, reopen the cold supply, and leave a hot tap running until water flows smooth with no air sputter. Only then switch the power back on or relight the burner — an electric element fired in a half-empty tank will burn out.
The low-ceiling problem, solved
A full-length anode rod is around 44 inches long, and it comes straight out the top. In a basement with low joists or a utility closet, there's simply no room to lift it clear — people get halfway and realize they're stuck with a rod jammed against the ceiling. The answer is a flexible segmented rod: short metal links joined so the whole thing bends like a bicycle chain. You feed it into the port a section at a time, and it straightens out inside the tank. Keep one on hand before you start if headroom looks tight, and getting the old rod out is the only awkward part — bend it over as it comes free.
Magnesium, aluminum, and the smell
If you're doing this because the hot water smells like rotten eggs, the rod choice matters. That sulfur smell comes from bacteria reacting with a magnesium anode. Magnesium gives the best protection and is the right default for most normal water, but in soft water it gets eaten quickly and can drive the odor. Switching to an aluminum-zinc rod usually clears the smell and lasts longer in soft or aggressive water. If your water's normal and there's no odor, stick with magnesium. Solving a smell or fighting soft water, go aluminum-zinc. It's a small choice that decides whether you're back at the tank in two years or six.
What it costs versus what it saves
The math on this one is almost unfair. A magnesium rod is around $25, an aluminum-zinc rod a few dollars more, and a segmented rod for tight spaces runs $30 to $40. Add thread tape and, if you don't own one, a socket for a few dollars. Renting an impact wrench for an afternoon is optional but cheap. All in, a do-it-yourself anode change lands well under $50 and takes under an hour once you've done it once. A plumber will do the same swap for roughly $150 to $250 with the service call, which is still money well spent if you'd rather not fight a seized head.
Set that against the alternative. A tank that loses its anode and rusts through is a full replacement — $1,200 to $2,000 installed for a standard unit, more for high-efficiency or larger tanks, plus the cost and mess of an emergency when it lets go. Spending $25 every few years to push a tank from an eight-year life toward fifteen isn't maintenance so much as buying time at a steep discount. Few things you can do to a water heater pay back this well.
Frequently asked
How do I know the rod needs replacing?
Pull it and look. Bare steel core wire showing over much of its length, or a rod worn to a thin wire, means replace. Rusty hot water or a rotten-egg smell are the cues to check.
How often should I change it?
Check every 3–5 years, sooner on soft or aggressive water. Many tanks are on their second rod long before they'd otherwise fail — that's the rod doing its job.
What tools do I need?
A 1-1/16" socket, an impact wrench or breaker bar for the break, a hose to drain a few gallons, and thread tape for the new rod.
Why does my hot water smell like eggs?
Bacteria reacting with a magnesium anode. Switching to an aluminum-zinc rod usually clears it.
No room above the tank — now what?
Use a flexible segmented rod. It bends into the port a section at a time, so a low ceiling is no obstacle.
Magnesium or aluminum?
Magnesium protects best on normal water; aluminum-zinc lasts longer in soft or aggressive water and cuts odor. Match it to your water.
Tank already leaking from the base?
Then the anode came too late for this one. Confirm whether it's the tank or just a fitting first.