In some cases, yes it can be hereditary. Generally, hair loss caused due to genetics is referred to as male pattern baldness (MPB) or female pattern baldness (FPB)