I kept a journal and thought maybe something in the outside environment was causing my headaches. So I wore a mask all day while outside in the yard and bingo---no headache.
I had had blood tests at my doctors, but they only showed a slight allergy to egg whites. I went to an allergy, asthma and breathing specialist and they tested me by putting 64 pricks on the top of my skin with reagents. A few things triggered. I was allergic to cats, which did not show up on my earlier blood test. Then they ran the gamut again, only this time they placed the test items under my skin. I looked like I had measles or hives all over my upper arms where the tests were done! I had to ice down my arms and take 3 prednisone tablets and get some oxygen. My headache, which I had come in with, got much worse so I dosed up with Advil Cold and Sinus and Claritin. I was highly allergic to all the trees, all the grasses, all the weeds, and all the molds that were tested. I was also allergic to cats, dogs, and farm animals/livestock.
The treatment is to go in 2X/week and get diluted doses of what I am allergic to until I become desensitized. After my arms clear up, I will get tested for food allergies.
The NP who took care of me said he developed an allergy to peanuts over time. His wife was allergic to ALL fruits. You can get an allergy over time with repeated exposure to an allergen.
So if you have persistent headaches, you might have developed an allergy. You might consider getting tested at an MD's office that specializes. Good luck.