As with any pest, the best way to avoid nesting behavior is to take preventive action, especially during the spring and summer months.
First, seal off any entry points to your home. Changing weather patterns may open crevices around your doors and windows that wasps and hornets can easily take advantage of. If you notice your insulation suffering, take this as a cue that your home may be vulnerable to nesting activity as well. Shore up these entrance points, paying special attention to your roofing, basement and attic.
Make sure that you take away the food sources that wasps and hornets may be attracted to. Both of these pests are attracted to sweet foods and foods that contain protein. This includes pet food and old leftovers. The latter of these may be accessed through open garbage bags that you may leave in your backyard. Keep in mind that once a food source has been identified by a wasp or a hornet, they will imprint that source. Even if it is removed, you may have to deal with pests coming back to that area to conduct future searches.
Wasps and hornets switch to sweetened foods in the summer and fall. This is the time of year in which high-energy foods become less prevalent. Wasps and hornets will begin to die off if they cannot find sources of these foods, because intense activities such as flying require a great deal of sugar for them. During this time of year, make sure that you do not leave open soda cans or other sugary foods lying around your house or backyard. If you have fruit trees, be sure that you harvest the fruits so that they do not fall and leave sources for wasps and hornets. Cover your outside garbage cans as well.
Wasps and hornets will become much more aggressive during the late summer and fall, because they are facing imminent death if they do not find food sources. This is especially important to note if you run across a hovering pest.
Killing off individual wasps and hornets is counterproductive. When a single wasp and hornet dies, it releases a chemical that actually attracts other wasps or hornets of the same species to the area. Those pests will also become more aggressive.
Other actions that you can take to discourage nesting activity include staying away from bright colors on your clothing or floral patterns. Wasps and hornets may actually mistake these colors for flowers that produce nectar. Similarly, the strong scents that come from perfumes and colognes may also attract wasps and hornets, especially in the latter part of the summer. They may mistake the perfume or the cologne for a sweet smelling food.
You must take special precautions if you have smaller structures such as birdhouses on your property. Lining the area under the roof with aluminum foil is a great way to avoid nests in that area. You can also avoid nesting activity by rubbing the area under the roof with common bar soap. This should last you through a whole season of nesting.
You may also invest in one of many simple traps or deterrents such as the fake nest. For instance, the fake nest works on the principle that wasps and hornets tend to avoid the nests of other wasps and hornets. When nesting, they mistake the fake nest for a real one, and nest elsewhere.