Purposely hitting their head

Tanya

My son will purposely hit his head on the floor, against the wall, with his hands, or on me if he is tired or does not get his way. He starts off with a tantrum and ends up purposely hitting his head. I’ve tried to ignore it, redirect his attention, massage his head and straight up yelling at him to stop. Nothing works. I hear this is a phase but he’s been doing this for almost 10 months now. It pisses me the F off. My MIL says that my husband used to do this at this age. So I blame my husband. Does anyone else have these issues? I don’t know what else to do.