The Eurasian hoopoe (Upupa epops) is the most widespread species of the genus Upupa, native to Europe, Asia and the northern half of Africa. Nine subspecies of Eurasian hoopoe are recognised by Kristin (in the 2001 Handbook of the Birds of the World). They vary mostly in size and the depth of colour in the plumage. The Eurasian hoopoe is widespread in Europe, Asia, and North Africa and northern Sub-Saharan Africa. Most European and north Asian birds migrate to the tropics in winter. In contrast, the African populations are sedentary all year.
The hoopoe has two basic requirements of its habitat: bare or lightly vegetated ground on which to forage and vertical surfaces with cavities (such as trees, cliffs or even walls, nestboxes, haystacks, and abandoned burrows) in which to nest. These requirements can be provided in a wide range of ecosystems, and as a consequence the hoopoe inhabits a wide range of habitats such as heathland, wooded steppes, savannas and grasslands, as well as forest glades.
In what was long thought to be a defensive posture, hoopoes sunbathe by spreading out their wings and tail low against the ground and tilting their head up; they often fold their wings and preen halfway through. They also enjoy taking dust and sand baths.
Source : Wikipedia