A water heater install looks simple on YouTube until the moment your inspector points at the dielectric union and asks why you used galvanized fittings on a copper supply line. Water heater connections have to handle scalding water at 80 psi, resist galvanic corrosion between dissimilar metals, and meet local plumbing code, all while staying leak-free for 12-15 years. After 22 years installing tank and tankless water heaters in residential and light commercial settings, I have a tight checklist for what works and what fails inspection.
- The Five Standard Connection Points
- Flex Connectors vs Rigid Pipe
- Dielectric Unions and Galvanic Corrosion
- The T&P Valve and Discharge Pipe
- Gas Connection Specifics
- Electric Connection Requirements
- Expansion Tank Requirements
- Step-By-Step Connection Sequence
- Common Mistakes That Cause Leaks
- When to Hire a Plumber
The Five Standard Connection Points
Every standard residential tank water heater has the same five connections, and each one has its own rules.
- Cold water inlet (top, blue or unmarked)
- Hot water outlet (top, red or unmarked)
- Temperature and pressure relief valve (T&P, side or top)
- Drain valve (bottom front)
- Energy supply (gas line for gas units, 240V wiring for electric)
Tankless units add a few more, including condensate drain on condensing models and isolation valves on both supply lines for service flushing.
Flex Connectors vs Rigid Pipe
The biggest connection-style decision is flexible braided lines or rigid soldered copper. Both are code-compliant in most jurisdictions; each has clear strengths.
Flexible stainless braided connectors install in 10 minutes per side, absorb minor misalignment between the heater and existing pipes, and make future heater swaps easy. The downside is a slightly higher failure rate over 15-20 years and a faster flow restriction if scale builds up inside the corrugations.
Rigid copper or PEX is more permanent, has better long-term flow, and is required by some local codes. Rigid lines need to be perfectly aligned with the heater nipples or you risk cross-threading the connections. PEX with sharkbite or expansion fittings hits the sweet spot of performance and DIY-friendly installation.
Dielectric Unions and Galvanic Corrosion
If your water heater has steel tank nipples (almost all modern units do) and you connect copper directly to those nipples, electrolysis between the two metals causes the steel to corrode rapidly. Within 5-7 years, the connection fails and leaks.
The fix is a dielectric union, which separates the two metals with a plastic insulator and a rubber gasket. Install one on each top connection, and use thread sealant rated for potable water (Loctite 567 or PermatexTeflon paste) on every threaded joint.
Modern braided connectors often have built-in dielectric isolation in the brass-to-stainless transition. Confirm by checking the manufacturer specs; not all “stainless flex” lines provide true galvanic separation.
The T&P Valve and Discharge Pipe
The temperature and pressure relief valve is a non-negotiable safety device. If the tank’s thermostat fails and the water boils, this valve releases pressure before the tank explodes (and tank explosions launch water heaters through roofs; this is not theoretical).
- The discharge pipe must be the same diameter as the T&P outlet (usually 3/4 in.)
- It must run downward continuously with no traps
- It must terminate within 6 in. of the floor or to an approved drain
- It must never be capped, plugged, valved, or threaded at the discharge end
- It must be made of a material rated for boiling water (CPVC, copper, or galvanized; not PVC)
An incorrectly piped T&P discharge fails inspection more often than any other water heater detail. Get this right and most of the other code requirements fall in line.
Gas Connection Specifics
For gas water heaters, the supply line must include a gas shutoff valve within 6 ft of the appliance, a sediment trap (drip leg) before the appliance inlet, and a flexible CSST or yellow-jacketed gas connector if rigid pipe alignment is not possible.
Use yellow Teflon tape (rated for gas, not the white plumbing tape) on every threaded gas connection. Test all joints with a gas leak detection solution or soapy water after the line is pressurized; a single failed joint can cause asphyxiation or explosion.
Electric Connection Requirements
Electric water heaters need a dedicated 240V circuit, typically 30 amps for standard 4500W units. The wire must be 10 AWG copper (or 8 AWG aluminum), and the connection at the heater is made inside a junction box on top of the tank.
A disconnect within sight of the heater is required by code in most jurisdictions. This can be a service-rated breaker or a disconnect switch mounted on the wall near the heater. Hardwired connections (no plug) are standard.
Expansion Tank Requirements
If your home has a closed plumbing system (a backflow preventer or check valve at the main supply), code requires a thermal expansion tank on the cold-water inlet. As water heats and expands, that extra volume needs somewhere to go, or it builds pressure and stresses every connection in the house.
The tank mounts horizontally above the cold inlet, with its own brass tee fitting. Pre-charge the tank to the home’s static water pressure (typically 50-70 psi) before installing. Without this step the tank acts as a solid plug rather than an expansion buffer.
Step-By-Step Connection Sequence
The actual connection process flows in a specific order to minimize mistakes.
- Set the tank in place on a drain pan, level in both directions
- Wrap nipple threads with Teflon tape or sealant, install dielectric unions or transition fittings
- Connect cold inlet first, hot outlet second
- Install T&P valve and discharge pipe
- Install expansion tank if required
- Make gas or electrical connection last (so water lines are tested under pressure first)
- Open cold supply, fully fill the tank, and bleed air through the highest hot-water faucet in the house
- Only after the tank is full and air is purged, energize the gas or electrical supply
Energizing an electric heater dry burns out the heating elements within seconds and voids the warranty.
Common Mistakes That Cause Leaks
The same handful of installation errors cause most water heater connection failures.
- Over-tightening flexible connectors (compresses the rubber washer until it splits)
- Using regular Teflon tape on gas lines
- Skipping the expansion tank on closed systems
- Leaving the T&P discharge tube terminated above the floor
- Connecting copper directly to steel tank nipples without dielectric isolation
- Failing to support flexible lines properly, allowing them to kink
When to Hire a Plumber
Water heater swaps are one of the more accessible major plumbing projects, but every jurisdiction has its own permit and inspection rules. If your municipality requires a licensed plumber for the install, an unpermitted DIY job can void your homeowner insurance after a water-damage claim. For first-time installs, gas-fueled units, or anything outside your comfort level, the $400-$700 plumber fee often pays for itself in peace of mind.