Boxes can be painted or stained if a light color is used. Treated lumber should not be used because of its toxic content. A bluebird box should never have a perch. Sparrows and wrens are attracted to perches. Coating the pole with grease will also help to keep predators off the box.
Hardware cloth placed under a box helps to prevent snake predation.
Unless your trail is in an area where raccoons are not present, avoid mounting bluebird boxes on a fence line or on trees. Raccoons are known to walk fence lines and may find your boxes. Open rural country with scattered trees and low or sparse ground cover is best. Suitable habitat should include perch sites, such as a fence line, wires, or tree branches where bluebirds may perch to search for food. Look for these when you are selecting a location for your nesting boxes.