Use galvanized nails, as these will not rust. Birdhouses need not be painted, but the box may last longer if you paint the outside. Never paint the inside of a birdhouse. If you paint the outside, use dull (not bright or glossy) colors that blend in with the surroundings. Nest boxes that don't match the vegetation may be easier for predators to find.
Build a box that will stay dry and warm. Place the roof of a birdhouse at a slight angle and extend it over the sides and front of the box. In this way, the roof will shed rain or snow and protect the entrance hole and sides from dripping water. Drill four, 1ǚ_inch holes in the floor to provide drainage if water seeps in. The sides of a nest box should extend down beyond the floor so water won't leak in.