Men in the state of الإحرام are clearly prohibited from covering their head with anything that is fitted to or rests directly on the head. This includes hats, caps, turbans, headbands, helmets, hoods, and any similar head covering. The ruling comes from النبي's instruction that a muhrim 'should not wear a turban' and his guidance regarding a man who died in الإحرام: 'Do not cover his head, for he will be raised on the Day of Judgment reciting the talbiyah.'
However, several forms of shade are permitted because they do not constitute 'covering' the head in the prohibited sense. Using an umbrella is universally allowed by scholars — this was practiced by النبي himself, who had companions shield him from the sun with cloth on sticks. Standing under a tent, sitting in a shaded area, or riding in a covered vehicle are all جائز. The key distinction is between something resting on the head versus shade that is separate from the head.
If a man accidentally covers his head (e.g., pulling a blanket over himself while sleeping), he should remove the covering as soon as he becomes aware. Scholars differ on whether فدية is required for accidental covering — the Hanafi school requires it regardless, while others say no فدية is needed if it was unintentional and removed immediately. Given the extreme الحرارة during الحج season, always carry an umbrella for sun protection.