Men in the state of Ihram 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 Nabi's instruction that a muhrim 'should not wear a turban' and his guidance regarding a man who died in Ihram: '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 Nabi 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 boleh. 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 fidyah is required for accidental covering — the Hanafi school requires it regardless, while others say no fidyah is needed if it was unintentional and removed immediately. Given the extreme panas during Haji season, always carry an umbrella for sun protection.