Honeybees have many adaptations for defense:
Adults have orange and black striping that acts as warning coloration. Predators can learn to associate that pattern with a painful sting, and avoid them.
Honeybees prefer to build their hives in protected cavities (small caves or tree hollows). They seal small openings with a mix of wax and resins called propolis, leaving only one small opening.
Worker bees guard the entrance of the hive. They are able to recognize members of their colony by scent, and will attack any non-members that try to enter the hive.
Workers and queens have a venomous sting at the end of the abdomen. Unlike queens, and unusual among stinging insects, the stings of Apis workers are heavily barbed and the sting and venom glands tear out of the abdomen, remaining embedded in the target. This causes the death of the worker, but may also cause a more painful sting, and discourage the predator from attacking other bees or the hive.
A stinging worker releases an alarm pheromone which causes other workers to become agitated and more likely to sting, and signals the location of the first sting.
Honeybees are subject to many types of predators, some attacking the bees themselves, others consuming the wax and stored food in the hive. Some predators are specialists on bees, including honeybees.
Important invertebrate enemies of adult bees include Thomisidae and Araneidae, wasps in the genus Philanthus (called “beewolves”), and many species of social wasps in the family Vespidae. Vespid wasp colonies are known to attack honeybee colonies en masse, and can wipe out a hive in one attack. Many vertebrate insectivores also eat adult honeybees. Toads (Bufo) that can reach the entrance of hive will sit and eat many workers, as will opossums (Didelphis). Birds are an important threat – the Meropidae (bee-eaters) in particular in Africa and southern Europe, but also flycatchers around the world (Tyrranidae and Muscicapidae). Apis mellifera in Africa are also subject to attack by Indicatoridae. These birds eat hive comb, consuming bees, wax, and stored honey. At least one species, the greater honeyguide (Indicator indicator) will guide mammal hive predators to hives, and then feed on the hive after the mammal has opened it up.
The main vertebrate predators of hives are mammals. Ursidae frequently attack the nests of social bees and wasps, as do many Mustelidae such as the Eira barbara in the Neotropics and especially the Mellivora capensis of Africa and southern and western Asia. In the Western Hemisphere Mephitidae, Cingulata and Vermilingua also raid hives, as do pangolins (Manis) in Africa. Large primates, including Papio, chimpanzees (<<g.Pan>>) and Gorilla are reported to attack hives too. Smaller mammals such as mice (Mus) and rats (Rattus) will burrow into hives as well.
Some insects are predators in hives as well, including wax moth larvae (Galleria mellonella, Achroia grisella), and hive beetles (Hylostoma, Aethina), and some species of Formicidae. In their native regions these tend not to be important enemies, but where honeybees have not co-evolved with these insects and have no defense, they can do great harm to hives.