Summarize this article:

You should never try to reignite your pilot if there is gas leaking from your water heater, as this is extremely dangerous to both you and your home. Before attempting to relight the pilot, do a simple smell test to check for leakage. Stand next to your water heater and see if you detect any unusual smells. Then kneel down and sniff near any valves on the front and side of the tank. Natural gas is odorless by nature, but gas companies add a substance called mercaptan to it to make it detectable to humans. Leaking gas smells like sulfur or rotten eggs. If you smell gas in either of these places (even a faint smell), do not attempt to relight the pilot. Leave the area of the water heater and call your gas company immediately; they will tell you how to proceed. Also listen for a hissing sound near the water heater, as this is a sign of a gas leak. Specific instruction of details for your individual model may be listed here, and they may help guide you in the process of relighting the pilot for your specific water heater.

Summary:
Make sure there is no leaking gas. Check inside the door panel of your water heater for instructions.