Autoimmune diseases, such as alopecia areata, can cause patchy hair loss that may affect the hairline.