I get "cough headaches." When I cough hard I get a pain in my head but it goes away after a short while. Is this dangerous?

Not Dangerous But. Headache caused by coughing hard is not really dangerous.But having said that the cause of cough needs to be determined and there may be co existing Sinus congestion/infection which if there may need to be treated appropriately.i suggest you consult your doctor and get checked and treated.