Each species has requirements for the diameter of trees it can use, and while it may use a larger tree, it will not use a smaller one. Cavities are made at varying heights above the ground, reducing competition for locations among species. The habitat around the cavity site also determines the suitability for a species, including type of vegetation, the amount of space, the presence of water. Some species of birds, called primary excavators, excavate a new hole for nesting every year. Then there are the secondary users, birds that use old excavated cavities or use natural cavities.
Cavities are usually in snags, which is the term for standing dead or dying trees.
Living trees with cavities are called den trees. A downy woodpecker spends 13 to 20 days excavating a cavity in trees that are bigger than 6 inches dbh. The nest height is 3 to 50 feet above the ground, and the female selects the site. They prefer nesting in the upper parts of dead trees set in open woodlands. They make cavities as their courtship activity and for nesting.