Thanks for writing your query.
are single sided headaches which can be decreased by some medications but they can be again triggered by some factors.
Some common trigger factors are :-
1. Lack of sleep.
2. Missed meal.
3. Physical or mental stress.
4. Dairy products.
5. Foods containing MSG.
6. During menstural periods in females.
You can identify the factor which is triggering your attack and try to avoid them.
Since you have mentioned pain in back of head and your neck, you should not ignore the possibility of cervical spondylosis
as the cause of your pain.
You should get yourself clinically examined by an Orthopedician and get a MRI of head and neck done.
If cervical spondylosis is the cause of your pain, you should take muscle relaxant
like chloraxazone along with pain killer like Ibuprofen(motrin) twice a day after meals, along with an antacid like Omeprazole
Local application of pain relieving gel after hot fomentation will be helpful.
I hope this is helpful to you.