Hi,
Your headache and neck
stiffness has been going on for a long time now. I feel you must get it evaluated. It can be associated with various reasons. First of all, be careful about your posture.
A poor posture like an abnormal tilting of head and neck while using a computer or phone or abnormal tilting while doing activities like swimming, playing, all this can unnecessarily stretch the muscle and cause pain. similarly while sleeping abnormal posture, high pillow can aggravate the symptoms.
Besides, there are other medical conditions like
chronic meningitis ( brain infections ),
osteoarthritis ( wear and tear of neck joints ), or any kind of trauma which can cause this problem.
So work on your posture, avoid excessive activity that strains your neck muscle, can do light stretching exercise. you can even take a pain killer if needed.
If still, your symptoms does not improve, then go for some investigations like
complete blood count, sugar levels,
ESR, and Xray neck.
Hope I have answered your query. Let me know if I can assist you further.
Take care
Regards,
Dr. Milinda Gupta