You can do a combination of any or some of things of course. We more or less stick with the not letting him out without being watched, combined with having an area where he is allowed to dig. This last area is the dog run, which is just beyond our backyard, and our dog, Holkschter Lah De Dah, a Pharaoh Hound, has dug some fine holes down the back, where he's allowed to dig.
This dog run has a damaged fence at the moment, and while our dogs don't seem to be jumpers, we know they could easily jump this damaged fence it they wanted to. We make sure the dogs don't have access to the dog run unless they are under some kind of watch. When the fence has been fixed, we can be more relaxed about the whole thing ...
It's coming to the hotter part of the year though, and we know there are probably snakes around the place. There have been in the past and will be in the future. We also know the snakes around our place are likely to be brown snakes, that can kill a dog with just one bite. Snake bites are expensive to deal with, if your dog (or cat) gets bitten. It's a tragic thing to have happen, and I would be grateful to never ever have a dog of ours bitten again!
Lah De's little sister, Missy, was bitten a couple of years ago, and I'm happy we were able to get her to the vet in time. It was expensive though, and could easily not have been successful at keeping her alive. Missy is mostly a sweet girl, with a couple of less than sweet habits, but I'm happy she is still in our little pack of dogs.
I launched a new book very recently, "Tense & Still", a collection of poetry about the various creatures in my life. Missy is in there, her and her brother's mother is in there too, as are snakes, cats, rabbits, and a variety other lovely, and unlovely critters.
I don't have any diggy dog poems there, but there are certainly some creatures in the book that know how to dig!