Headaches generally should have no correlation with hairfall and dandruff. In very rare cases we see what we call Scalp dysaesthesia where a painful scalp preceeds an excessive hairfall.
Treatment for both hairfall and dandruff is cause specific
Hairfall could be due various nutritional deficiencies or specific medical conditions which will need to be evaluated and treated accordingly. In general
TSH, Sr Vit D3, Sr Vit B 12 levels can be done
Dandruff which is a term loosely used for a flaky scalp again could be due to seborrheic dermatitis, scalp psoriasis, pityriasis sicca all of which require detailed history and examination to be appropriately diagnosed