When considering how to attach a nesting box, or bird house as they are commonly referred to, hanging a nesting box or bird house on a tree is often not the best favour you can do for birds. A better plan is to mount your box on a pole or post well away from trees, roof overhangs and other means by which predators can gain access to the box.
Decide what varieties of birds you want to attract. Placing a box at eye level or a bit higher will attract many varieties of birds. If you want Northern Flickers, which will hunt and eat ants in your yard, attach a box outside a second-story window, again ensuring a predator cannot drop onto the box from a roof overhang or nearby tree.
Mount a pole or post in a sunny spot well away from trees, overhead wires and eaves of roofs. Mount the pole as you would a fence post or else follow any of the directions for pole and post mounting found on the Internet. To avoid squabbling among different varieties of birds, place your poles or posts as far away as possible from each other.
Mount a squirrel guard on the post or pole below the bird box. Guards are sold in most home improvement stores. Alternatively, try coating the lower portion of your pole or post in axle grease to keep squirrels and cats from climbing.
Mount a box on the pole with the entrance hole facing away from prevailing wind and rain. Decorate it or outfit it according to the varieties of birds you want to attract. Purple martin houses and boxes should be white. Nuthatches like boxes sheathed in tree bark. To attract Northern Flickers, place a piece of rotting wood in the box.
If you are insistent on mounting your box on a tree trunk, do not strap it to the trunk as the strap will inhibit tree growth. Screw the box to the truck using the smallest screws possible and do not provide a perch outside the entrance hole as this will just make it easier for predators to gain entrance and destroy the bird eggs inside.
Do not strap a box or house to a tree trunk as this will inhibit tree growth.
Hanging a bird nesting box or bird house on a tree trunk just makes it easy for squirrels, cats, snakes and other predators to gain entrance. A smarter approach is to mount a box or house on a pole or post well away from tree limbs, utility wires and roof overhangs. Do not provide perches outside entrance holes to bird houses or boxes because this just makes it easier for predators to gain entrance.