The mucus actually emanates from the base of your throat and not from the back of the nose or the windpipe. This is difficult to eradicate. Getting a headache from forceful coughing may not have a serious cause unless frequent headaches
occur other times also. An otolaryngologist is best to evaluate you.