If you have pain in the top of your head, go for the back of the neck; the muscle called splenius capitis (SPLEE-nee-us CAP-uh-tiss). This muscle extends your neck and head, rotates and flexes your head and neck to the side. It is a very common cause of headache.
You can massage firmly along this muscle especially on the trigger point, the blue circle I indicated in the image above. The image is not to scale, and the location of the trigger point is approximate (applied to any other images). If you find any points which send referral pain and intensify the pain you have, those are the trigger points, and they are to be treated. It might not make sense to seemingly make the pain worse, but after a while, the pain subsides and the headache will be gone! Trust me.
And, don’t forget to massage the sternocleidomastoid (SCM) as it is also the cause of the pain in the top of your head.