When building yourself an underground base, you do need to remember that you are building underground- and probably want to -stay- underground. Because of this, avoiding the surface becomes important. Initially, this doesn’t seem likely to be a big concern, but the larger your home is, the more difficult it becomes. And it is a skill that you will need to cultivate while building underground.
The surface of the world in Minecraft is uneven, unless you’ve chosen the ‘flatworld’ option when starting your world. This doesn’t just mean rolling hills. Ocean, both with and without islands; tall mountains with abrupt or sloping sides; and occasionally immense ravines carved into the depths from the surface of the world. All of these features can interfere pretty severely with your attempts to build a good-sized home of the subterranean sort.
The first, and most obvious, part of successfully avoiding the surface when building an underground base is not to build it inside of a small mountain, or a mountain with a large hole in it. While it may not seem like it at first, a decent underground base takes up a lot of space, and there’s nothing quite like starting to dig out your new room only to find yourself falling out the back of your mountain, or into the huge hole drilled into the base of it where a ravine was placed when the world was created.
Of course, ravines can also be hidden inside of otherwise perfectly large and solid mountains, as well as at random points in the underground of the world as a whole. Because of this, you want to dig and move at a steady but cautious pace when digging out an underground home, just as when digging out a mine.
The second guideline to not making your subterranean home into a not-so-hazardous pit trap is to not dig through dirt. There -are- pockets of dirt inside of stone, and these are safe, but they tend to be small and are usually found next to gravel pits. The surface of the world is coated with dirt, though- or sand in some places- and when you encounter it, this is often your only hint that you’re about to breach the surface and turn your house into a tunnel. You can always fix this by putting the dirt back and underlaying it with stone, but it’s better to just not make the error to begin with. It’s easier to avoid this problem if you’re digging sideways and can see the side of the block- surface blocks of dirt tend to have the characteristic grassy top, which also alters the sides of the blocks slightly.
The third point is this- if you’re going to make your home underground, make it -really- underground. Don’t just go down a layer and then move off to the side- dig deep into the stone of the world before you start construction on the rooms and halls of your new home. It’s much easier to avoid the surface if you’re nowhere near it- this reduces your concerns to ravines, which are generally something you want to be careful of anyways.
Speaking of ravines, if you encounter one while you’re building your home, you probably are going to want to move. Ravines are pretty much impossible to keep well-lit and are therefore huge sources of wandering monsters. Leaving an opening into a ravine could be a recipe for logging in to a faceful of zombie or creeper. Keep in mind where the ravine is, and probably leave a tunnel dug to it, but it’s really not a safe spot to put your home.