Gophers are notoriously difficult to get rid of. They burrow a foot or two below the surface and pop up all over. To add insult to injury they dine on many of the things we like to plant in our garden. We'll discuss the various methods to rid your yard of gophers, ranging from humane to lethal.
First of all, let's identify the creature. There are more than one type of burrowing rodents. The two most common are gophers (aka pocket gophers) and moles. You can tell the difference by how they mound their dirt. Gophers push their excavated dirt out through a hole and off to one side. A gopher mound always has most of the dirt on one side. On the other hand a mole pushes out the dirt and makes a cone, with their hole right in the middle, like a little volcano.
Since gophers are a force of nature, you could focus on protecting your garden rather than eliminating gophers. This option involves using wire mesh to create barriers to gopher. If you are installing a new lawn, consider the first layer, before soil amendments and compost put down galvanized hardware cloth. It should be no more than six inches under ground and any digging that may be needed, such as to install irrigation should be completed first. This will prevent the gopher from coming up through your new lawn. Instead they will hit the wire and be forced to go elsewhere.
To protect flower beds, it is not practical to bury hardware cloth because of the digging that will naturally occur when planting. Furthermore, burying it deeper will just force the gopher to burrow above the barrier. Instead trenching around a garden to the depth of 24 inches will allow you to place a vertical barrier around the garden. However, the drawbacks are that for it to be fully effective the cloth must extend above the ground - preferably by 12 inches. Also, while gophers burrow mostly in the one to two foot zone, they have been known to go a few feet deeper. This fencing will likely reduce gopher traffic but cannot guaranty anything more.