First, you have to have a clean healthy scalp to protect yourself from seborrhoic dermatitis. This is achieved by washing the scalp well with shampoo and exposing your hair to air and sunshine. Cutting your hair, if your scalp is affected, may help.
Attribution: Avallain