Inside buildings, household ants feed on sugar, syrup, honey, fruit juice, fats, and meat. Long trails of thousands of ants may lead from nests to food sources, causing considerable concern among building occupants.
Outdoors ants are attracted to honeydew that soft scales, mealybugs, and aphids produce. This liquid excrement contains sugars and other nutrients. Frequently outbreaks of scales and aphids occur when ants tend them for honeydew because the ants protect scales and aphids from their natural enemies.
To keep ants out of buildings, caulk cracks and crevices around foundations and other sites that provide entry from outside. Ants prefer to make trails along structural elements, such as wires and pipes, and frequently use them to enter and travel within a structure to their destination, so look for entry points in these locations.
Ant baits contain insecticides mixed with materials that attract worker ants looking for food. Baits are a key tool for managing ants and the only type of insecticide recommended in most situations. Ants are attracted to the bait and recruit other workers to it. Workers carry small portions of the bait back to the nest where it is transferred mouth to mouth to other workers, larvae, and queens to kill the entire colony. Bait products must be slow-acting so that the foraging ants have time to make their way back to the nest and feed other members of the colony before they are killed. When properly used, baits are more effective and safer than sprays.
A common practice used to prevent ants from coming indoors is to apply a perimeter treatment of residual sprays around the foundation, but that won't provide permanent control, because it kills only foraging ants without killing the colony and the queens.