Securing water heaters is mandatory in the State of California when buying or selling a home. It is also California State law that water heaters be secured with State Architect approved restraining devices (as shown).
If a water heater topples over in a quake, the gas connections can rupture and potentially spark a fire.
Water heaters must be secured with two straps, one near the top and the other near the base, that are firmly anchored to the studs or masonry. Bracing kits are widely available to make this process easy.
If the water heater is located in your garage it must be elevated off the floor. This can be done by installing a metal water heater stand. If it's located outside the house, it should be secured inside a separate enclosure. Flexible connectors (as shown in inset) are preferred as there's less risk of them rupturing in an earthquake.