[Possible causes] Mass lesion, subarachnoid hemorrhage Coughing and exertion increases the intra cranial pressure, which may cause a vessel to burst, causing a subarachnoid hemorrhage. A mass lesion already increases intracranial pressure, so an additional increase in intracranial pressure from coughing etc. will cause pain. [Diagnostic tests] Neuroimaging, lumbar puncture [Red Flag] 
Headache triggered by cough, exertion or while engaged in sexual intercourse