Carpenter bees are sometimes dissuaded from making nests in painted or stained wood. Paint is a better deterrent than stain, and bare wood is very inviting to a bee looking for a place to start a new nest. However, X. virginica will nest in almost any soft wood , particularly if it is exposed to the sun. In cases where carpenter bees persist in spite of paint, the edge of the wood can be covered with a narrow strip of flashing or screening, and painted, thus providing a physical barrier.
The eastern carpenter bee is faithful to its home, preferring to lay eggs in the same hole it was born in and hibernated in. Females who leave the natal tunnel prefer to live nearby, often digging a new hole a few inches away in the same piece of wood. Over many years, the bees may almost completely hollow out a single board, or a few boards, without ever touching adjacent pieces. Thus, carpenter bee habitations tend to remain clumped in one area. Because each female produces only a few young bees each year, their numbers grow slowly.
Since previous nests are the primary nests each year, blocking or poisoning nests can often backfire on the homeowner, by encouraging the carpenter bee to bore new nests. Over time the burrowing of these new holes may weaken structures.
An alternative means of preventing nesting in valuable wood is to attract the bees to another location by propping a beam of attractive bare wood where you would prefer the bees to stay. The theory is that the bees will build their nests in the wood you supply for them and stay away from your house. Often, an old wooden shed or barn sustains a population of carpenter bees.