Other people say 12 to 18 inches.
That's good if you're performing in front of a mind-meltingly expensive microphone, or an old, very rare microphone, with a sound engineer in a soundproof studio at Glen Glenn sound.
Home performers need not apply. Through some marketing decisions, home systems are almost always quiet. Microphones have restrained volume and interfaces have less boost than they need. I called Shure and complained about their X2U interface.
"I would give anything," I said, "for just 10dB more volume boost." "Sorry," they said. "That's the way it is."
I put it in the Garage.
It got so bad, (how bad did it get?) It got so bad, you had to yell to get any good recording volume (never blow into a microphone), and Microsoft started including "Microhone Boost" settings in their sound control panels. That created its own set of problems. That boosted everything including the natural microphone noise (shshshshshshshshsh), air conditioning noise, and the Metrobus in front of the house.
You get closer to the microphone to try and override the noises and start P-Popping and recording mouth noises. That's where the Hawaiian Shaka came from.
That turns into a Power Fist if you're using a pop and blast filter.
Nobody wins here.
That brings us to Oblique Positioning (B).
Since mouth noises tend to go straight in front of your face and downward, don't put the microphone there. Place it off to one side (roughly opposite your cheek) and level. You can get it a lot closer (and louder) without mouth noises.
Given this is not going to sound anything like Glen Glenn sound, proximity effect, etc, but it will get you through a voice-over or audiobook. Just don't move around a lot while you perform. Real-time monitoring on good headphones is demanded with this technique.
That's David Greene and his Sony MDR-7506 sealed headphones. One caution. Those headphones will show you errors before anybody else can hear them. That's why Hollywood uses them. They're not designed to settle in and watch a movie.