The most common cause by far is a failing thermocouple — the small safety sensor that sits in the pilot flame and signals the gas valve to stay open as long as it senses heat. When a thermocouple weakens or fails, it can't hold that signal, so the gas valve shuts the pilot off as a safety measure within seconds or minutes of lighting it, even though everything else about the water heater is fine. It's a low-cost, quick part to replace and by far the most common repair for this exact complaint.
A dirty pilot orifice is the next most likely cause — the tiny opening the gas flows through to create the pilot flame can get clogged with dust or debris over time, causing a weak, sputtering flame that struggles to keep the thermocouple properly heated. Draft issues are a related cause: if the pilot assembly is exposed to airflow — from a nearby vent, a door, or improper venting — the flame can flicker or blow out even with a healthy thermocouple. Less commonly, a genuine gas supply problem — low gas pressure or a partially closed gas valve — will starve the pilot regardless of how many times you relight it.
It's safe to try relighting the pilot yourself following the instructions on your water heater's label — that's a normal, expected part of gas water heater ownership. But if it goes out again shortly after, don't keep repeating the cycle; that's the signal that something specific needs fixing rather than another attempt. A thermocouple replacement, orifice cleaning, or draft correction are all straightforward for a licensed plumber. If you smell gas at any point, that's different and urgent — see our gas line page for what to do.

