What could a knot be just above your right ear in your hairline that is getting bigger and hurts only when you press on it?

Hard to tell from your posting, but is could be anything from a blocked pore (pimple) to a cyst or even a small tumor! Best to schedule an appointment with your doctor to discuss your finding. If it's serious, more can be done sooner versus later. Good luck! If it is relatively small and you have only just noticed it, I would say it is something like a pimple. Or it could be a cyst - nothing to worry about. If it is around the size of a bottle cap and you have had a bump to the head recently, it could be a small amount of blood gathered under the skin - rather like a bruise. It should disappear in a couple of days. If it is around the size your smallest finger and you are the correct age (40+) and have had lots of exposure to the sun during your life (working or sunbathing), talk to your doctor and get tested for skin cancer. Most skin cancers are benign (safe) and can be easily removed in a doctors surgery. If you have recently had a head trauma (bump or accident) and the site is swelling rapidly, go to hospital. It could be a burst blood vessel which needs medical attention.