Some dogs do dig because they are bored, and it that case you should probably consider increasing the amount of exercise they get. Also, they probably should not be left unsupervised in the yard until this issue is under control. The more they dig, they more they self-reward and the habit becomes harder to break.
And some dogs, like terriers, just dig because digging is in their blood. In that case, yes, I think a sandbox might be a good plan. You will have to train them that the sandbox is the only acceptable place to dig, however, by supervising them so they can't dig anywhere else and praising and rewarding for digging in the correct spot.
And some dogs, like terriers, just dig because digging is in their blood. In that case, yes, I think a sandbox might be a good plan. You will have to train them that the sandbox is the only acceptable place to dig, however, by supervising them so they can't dig anywhere else and praising and rewarding for digging in the correct spot.