Tailoring the house you build to the needs of species you want to attract will increase your chances of success. Use rust-proof hinges to make the task easier. The sides of the house should enclose the floor to keep rain from seeping into the house and nest. Don't put perches on any bird house. The only birds that prefer them are starlings and house sparrows.
Wood is the best material to use for bird houses.
Do not use tin cans, milk cartons or metal nest boxes. They can overheat and kill the eggs and young birds. The only exceptions are commercial aluminum martin houses. Most birds are territorial and protect the area around their nests. Goldeneye mergansers and wood ducks are not territorial, so you can place their houses closer together.