How to Plumb a Water Heater

Plumbing a water heater might sound intimidating, but with the right preparation, it’s a manageable project for many homeowners. Whether you’re replacing an old unit or installing one for the first time, knowing how to plumb a water heater correctly ensures safe operation, efficient performance, and long-term reliability. A poor installation can lead to leaks, pressure problems, or even dangerous gas and electrical hazards.

This guide covers every essential phase of the process, from safety prep and choosing the right unit to connecting supply lines, venting gas models, and testing your work. You’ll learn which tools and materials you need, common mistakes to avoid, and when it’s best to call a licensed plumber. Follow these steps carefully, and you’ll have a code-compliant installation that delivers hot water reliably for years to come.


Essential Safety Precautions Before You Begin

Working with water, gas, and electricity carries real risk, so safety must come first. Rushing this stage can result in burns, shocks, flooding, or gas leaks.

Shut Off Water and Power Sources

Turn off the cold water supply at the shutoff valve near the heater. If there’s no dedicated valve, close your home’s main water supply. For electric heaters, switch off the corresponding breaker at your electrical panel. For gas models, rotate the gas control knob to the “Pilot” or “Off” position. Never begin work on a live system.

Drain the Existing Tank Safely

If you’re replacing an old unit, attach a garden hose to the drain valve at the tank’s base and route it to a floor drain or outside. Open the valve and let the tank empty completely. Opening a hot water faucet elsewhere in the house allows air into the system, which speeds up draining.

Pro Tip: Water inside a tank can be extremely hot. Let the unit cool for several hours before draining.


Choose the Right Water Heater Type

Your plumbing approach depends on the type and fuel source of the unit you’re installing. Matching your plumbing setup to the heater ensures compatibility and safety.

Tank vs. Tankless Models

Tank water heaters store 30 to 80 gallons of hot water and use standard inlet and outlet pipe connections. They’re simpler to plumb and widely used in residential settings.

Tankless (on-demand) heaters heat water only when needed. They require larger gas lines for gas-powered models and may need upgraded water pressure systems. Their compact size allows flexible placement but demands precise plumbing alignment.

Fuel Source Considerations

  • Electric: Requires no gas line but needs a 240V dedicated circuit.
  • Natural Gas: Needs a gas supply line, venting system, and a dielectric union to prevent corrosion.
  • Propane: Similar to natural gas but uses different pressure regulators and fittings.
  • Solar or Oil: Less common and usually requires professional installation due to system complexity.

Position and Secure the Unit

Correct placement affects safety, efficiency, and code compliance. Take time to set up the location before making any connections.

Install in a Designated Utility Area

Place the heater on a level surface in a well-ventilated space. Gas units require clearance from combustible materials, so check the manufacturer’s specifications. In garages, many codes require the unit to be elevated at least 18 inches off the floor to prevent ignition of gasoline fumes.

If you’re installing over finished flooring or in an upstairs location, place a drip pan with a drain line beneath the unit. This catches small leaks and directs water to a safe drainage point.

Anchor Tall Units for Stability

Tank models over 50 gallons should be strapped to wall studs using metal brackets. This prevents tipping during seismic activity or accidental impact.


Connect the Cold Water Inlet Line

dielectric union installation on water heater cold inlet pipe

The cold water inlet is where fresh water enters the tank and begins heating. Proper connection here prevents leaks and corrosion.

Use Dielectric Fittings on Steel Pipes

When connecting copper tubing to a steel water heater nipple, always install a dielectric union or dielectric nipple. This prevents galvanic corrosion caused by dissimilar metals contacting water. Wrap male threads with Teflon tape or apply compatible pipe dope to ensure a watertight seal.

Install a Shut-Off Valve

Add a full-port ball valve on the cold inlet line. This allows you to isolate the heater for future maintenance without shutting off water to the entire house.

Visual Cue: The cold inlet is usually marked on the top of the heater and is typically on the right side when facing the unit.


Connect the Hot Water Outlet Line

The hot water outlet carries heated water from the tank to your fixtures. Proper routing here improves flow and reduces heat loss.

Route Pipes with Minimal Bends

Use smooth, gradual turns in your piping. Sharp bends increase pressure drop and slow water delivery. Insulate the first 3 to 5 feet of the hot water pipe to minimize heat loss, especially in unheated basements or crawlspaces.

Prevent Thermal Expansion Issues

Heated water expands, and in a closed plumbing system, this can cause dangerous pressure buildup. Install an expansion tank on the cold water line near the heater. It absorbs excess pressure and protects the tank and plumbing from damage.


Gas Line Connection for Gas Models

Improper gas connections are a leading cause of residential fires and carbon monoxide poisoning. Take extra care during this step.

Use Correct Pipe Material

Black iron pipe is the standard for natural gas lines. Flexible gas connectors like CSST (Corrugated Stainless Steel Tubing) may be used where approved by local code. Never use PVC, copper (in some jurisdictions), or standard water tubing for gas lines.

Test for Leaks with Soapy Water

After tightening all joints, brush a mixture of dish soap and water onto each connection. Slowly turn on the gas and watch for bubbles. If bubbles appear, shut off the gas immediately and re-tighten or replace the fitting.

Warning: Never use an open flame to test for gas leaks.


Venting System Installation for Gas Units

Type B double-wall vent pipe installation for atmospheric gas water heater

Proper venting removes combustion gases safely to the outdoors. Incorrect venting can cause carbon monoxide to enter your living space.

Match Vent Type to Heater Category

  • Atmospheric Vent: Uses natural draft and requires Type B double-wall vent pipe.
  • Power Vent: Includes a fan to push exhaust outside; allows horizontal venting through a wall.
  • Direct Vent: A sealed system that draws combustion air from outside and vents exhaust back outside.

Follow manufacturer clearances to combustibles and roof lines. Slope horizontal vent runs slightly upward (about ¼ inch per foot) to prevent condensation from flowing back into the unit.

Seal Joints with High-Temperature Tape

Use aluminum foil tape, not standard duct tape, to seal vent pipe seams. Ensure the entire venting path is airtight and terminates outdoors with proper clearance from windows, doors, and air intakes.


Electrical Connections for Electric Models

electrical wiring diagram for 240V electric water heater with grounding and junction box

Electric water heaters require dedicated circuits and proper grounding to operate safely.

Verify Circuit Amperage

Most electric units need a 30-amp double-pole breaker and 10/2 NM-B wire. Check the label on your specific heater for exact requirements. Use a metal junction box and conduit if any wiring is exposed.

Ground the Unit Properly

Attach a grounding wire from your electrical panel to the heater’s grounding screw. This prevents shock hazards in case of an internal electrical fault.

Caution: Do not energize the heater until the tank is completely full of water. Running an electric heater dry will instantly burn out the heating elements.


Test for Leaks and Pressure

After making all connections, testing is critical to confirm a safe, leak-free installation.

Turn On the Water Supply Slowly

Open the cold water shutoff valve gradually to fill the tank. At the same time, open a hot water faucet elsewhere in the house to release trapped air. Wait until steady water flows from the faucet before closing it. This confirms the tank is full.

Inspect All Joints and Connections

Check carefully around these areas:
– Cold and hot water connections
– Drain valve
– TPR (Temperature and Pressure Relief) valve
– Gas line fittings (if applicable)

Tighten any connections that drip slightly, but avoid over-torquing, which can crack fittings.

Activate the System

For gas heaters, relight the pilot according to the manufacturer’s instructions and set the thermostat to your desired temperature. For electric heaters, restore power at the breaker and set the thermostat as needed.


Set Up the TPR Valve and Discharge Tube

TPR valve discharge tube routing and installation on water heater with ¾ inch copper pipe

The TPR valve is a critical safety device that releases pressure if the tank overheats or pressure builds dangerously.

Install a Correctly Sized Discharge Pipe

The TPR valve must have a discharge tube made of copper, CPVC, or stainless steel. Route it within 6 inches of the floor, and ensure the pipe diameter matches the valve outlet (typically ¾ inch). Never cap or plug the TPR valve discharge pipe.

Test the Valve Monthly

Lift the TPR valve lever briefly to flush sediment and confirm it operates correctly. Water should flow out and stop when you release the lever. Replace the valve if it leaks continuously or fails to open.


Flush and Maintain the System

A newly installed water heater should be flushed to remove any manufacturing debris or sediment.

Perform an Initial Tank Flush

Close the cold water inlet, open a hot water faucet, and drain several gallons through the drain valve. Reconnect the lines and refill the tank. This clears particles that could clog valves or damage components.

Schedule Annual Maintenance

  • Flush the tank once a year to remove sediment buildup.
  • Check the anode rod every 2 to 3 years and replace it if significantly corroded.
  • Inspect all pipes and fittings for wear, rust, or moisture.

Common Mistakes to Avoid

common water heater installation mistakes: expansion tank missing, over-tightened fittings, incorrect pipe materials

Even experienced DIYers can make preventable errors. Watch out for these common pitfalls.

Skipping the Expansion Tank

Without one, thermal expansion can cause frequent TPR valve discharge or damage fixtures and appliances.

Using Incorrect Pipe Materials

Never connect copper directly to steel nipples without dielectric protection. Mixing incompatible metals leads to rapid corrosion and leaks.

Ignoring Local Codes

Plumbing codes vary by region, and most jurisdictions require a permit for water heater installation. Skipping permits can void warranties and create insurance problems.

Over-Tightening Fittings

Excessive force cracks fittings, strips threads, and misaligns joints. Hand-tight plus one or two wrench turns is usually enough.


Know When to Call a Professional

Some installations are best left to licensed plumbers or contractors.

Required Permits and Inspections

Most areas require a permit for water heater replacement. An inspector will verify gas line sizing, venting, electrical grounding, and TPR compliance before approving the work.

Complex Retrofits and Conversions

Switching from electric to gas (or vice versa) often involves running new lines, upgrading electrical panels, or modifying vents. These tasks typically require professional expertise.

High-Efficiency or Sealed Combustion Units

Advanced models have strict installation requirements and may need specialized tools for calibration and commissioning.


Frequently Asked Questions About Plumbing a Water Heater

Do I need a permit to plumb a water heater?

Most jurisdictions require a permit for water heater installation or replacement. Check with your local building department before starting work to ensure compliance and schedule any required inspections.

How long does it take to plumb a water heater?

A straightforward replacement typically takes 3 to 6 hours, including draining the old tank, making connections, and testing. Complex installations or code upgrades may take longer.

Can I use flexible hoses for water heater connections?

Flexible braided stainless steel hoses are acceptable for water connections in many areas, but gas lines require approved materials like black iron pipe or CSST. Always verify local code requirements.

What is a dielectric union and why is it important?

A dielectric union is a fitting that connects two dissimilar metals, such as copper and steel, while preventing direct electrical contact. This stops galvanic corrosion, which can damage pipes and cause leaks over time.

How do I know if my water heater is full before turning on the power?

Open a hot water faucet in the house and let it run. When water flows steadily without sputtering or air bursts, the tank is full and you can safely restore power or gas.

Should I install an expansion tank?

If your home has a closed plumbing system with a check valve or pressure-reducing valve, an expansion tank is highly recommended. It absorbs pressure from heated water and protects your plumbing.


Key Takeaways for a Successful Water Heater Installation

Plumbing a water heater correctly comes down to three essentials: safety, precision, and code compliance. Always shut off water, gas, and electricity before starting, use dielectric fittings to prevent corrosion, and test every connection thoroughly before activating the system. Installing an expansion tank and a properly routed TPR discharge pipe protects your home from pressure-related damage.

Your next step is to gather your tools and materials, review your local building codes, and confirm whether a permit is required. If you’re confident in your skills, follow this guide methodically from start to finish. If any step feels beyond your expertise, especially gas line work or electrical connections, hire a licensed professional. A well-plumbed water heater will provide reliable hot water and peace of mind for many years.

Scroll to Top