Yes, that's right. Roughly speaking, if we can find the destination on a map
(New York City, the minimart, Oxford) or we can see it (the door, the window) or
we know where it is (the toilet, the entrance, the exit) you can use “to” or
“for” and the choice will be one of personal preference. So:
- the fire alarm went off in the supermarket and all the shoppers headed
to/for the exit.
In the figurative sense where we CAN'T find the destination on a map or we
don't know where it is (the stars, defeat, victory, etc.), use
“for”, so:
- Honza and Jana have only been married (for) eighteen months but they
always seem to be arguing. The way they're going, I think they're heading for (to) (a)
divorce.
There may also be contexts in which “heading for” means “going in the
general direction of”, and “heading to” means “going to a precise
address or destination”.
Google and the Ngram, used judiciously, can often be helpful when you want to
check this kind of usage.