Aim the mic at the obvious place – directly at the sound hole – and it’ll be overwhelmed by a build-up of bass resonance, making for a boomy recording or performance. Instead, to find the sweet spot for both warmth and clarity, move it east a bit, so it’s pointing at the junction between the guitar’s body and neck. This will typically be around the 12th – 14th frets.
If it still sounds too muddy, move it up the neck slightly – gently does it, just small increments at a time – but if you’re beginning to hear too much treble and annoying finger noise bring it back down towards the body again. All guitars and all mics behave differently, so it’s a matter of trial and error. Of course, as previously mentioned, small diaphragm condensers are a natural for this, because they can be aimed with great accuracy.
If the results are consistently boomy or thin, then play about with the distance between the mic and the guitar. Generally speaking, when recording you’ll want to get the best signal to noise ratio possible, which means bringing the mic right up close to the sound source. However, there are potentially two issues with this. Firstly, position the mic too close and it may interfere with your fretting hand. Second, the proximity effect will come into play, which manifests as a boost in bass frequencies.
Some microphones are much more prone to the proximity effect than others, and while some do add a pleasing warmth many just suffer a thick layer of muddiness. So, final placement will depend on your guitar, your mic and your playing style, but 6” to 12” should do the trick. Another good reason for placing the mic away from the guitar is so that you can pick up room ambience and natural reverb, which may be desirable. Or not. It’s your choice.