Yeah, realised that was a bit obtuse! This is all brawling rather than Budo, but all you need is a step back, grab, and take the head's motion forward and down, meet it with a knee - the head's motion defines the body's motion after all! It's possible to bend 'em over rather than excessively contort oneself. That was really intended as a flippant remark rather than real advice, though. Headbutts are horribly hard to avoid without just keeping ma ai to a long enough distance.
The best thing to do retroactively is just check for concussion, and be glad your nose isn't smeared.