Ants make for terrible houseguests: They come uninvited, get into everything, and are in no hurry to leave. Through the warmer months, the two types most likely to show up are carpenter ants and odorous house ants, aka house ants. When their natural habitat is destroyed, ants seek out alternate food sources, which is what brings them indoors.

More on pests

“The problem is they can really proliferate,” says Jody Gangloff-Kauffman, an entomologist and the director of the Integrated Pest Management Program at Cornell University. “By the time you start spotting them inside your house, you may already have hundreds.”

According to Gangloff-Kauffman, house ants—typically less than 1⁄8-inch long—are the most common ant species to invade your house. “The good news is that they’re really considered a nuisance pest,” she says. So while house ants may show up on your kitchen counters or around the shower, they won’t transmit disease or cause any real damage to your home.

How to get rid of ants.
An odorous house ant, left, and a carpenter ant.

The same can’t be said of carpenter ants, which feed on rotten or damp wood, potentially damaging windows, doors, or even structural framing in the process. Carpenter ants are about 1⁄4- to 1⁄2-inch long.

But think twice before you grab a can of bug spray and start crop-dusting your kitchen countertops.

“Ant poison may make you feel like you’re accomplishing something, but you’re not,” says CR senior scientist Michael Hansen, Ph.D., a biologist and ecologist who wrote his doctoral thesis on integrated pest management. “Unless you solve the problem of what’s attracting them to your house—and how they’re getting in—you should remember that there are thousands of ants in every colony, and you’ll just keep seeing them.”

With that pleasant thought in mind, here are five tips from our go-to experts in pest management on how to get ants out of your house—and keep them out.

1. Keep Your House Clean

Ants feed on sugar, protein, and just about anything else they can find. “Generally, a colony will send out a few ants to scout—they’ll bring back a sampling of any food they find to the colony, and hundreds will follow them back into the house,” Gangloff-Kauffman says. “And in my experience, they particularly gravitate towards sugary liquids.”

To keep scouts from returning with hundreds of their friends in tow, quickly clean up spills, particularly things like honey, maple syrup, and soda. And keep all food in airtight containers.  

2. Eliminate Damp Spots and Rotted Wood

“While house and carpenter ants generally form a primary colony outdoors, they’ll sometimes build satellite colonies inside a home to serve as a conduit for resources,” Gangloff-Kauffman says. “And both species prefer damp areas.” That means showers, windows, and damp areas in the basement all need extra attention.

Look for leaks, fix them quickly, and replace any water-damaged materials. “Unlike termites, which eat their way through new or old wood, carpenter ants will only tunnel through wood that’s already been damaged by water,” Gangloff-Kauffman says.

3. Set Ant Baits

“The most effective method for controlling an ant infestation is using ant baits—set them out anywhere you see ants and expect a party,” Gangloff-Kauffman says. “If you still see ants around the house, try a few different brands of baits until you find one that’s appealing to this particular colony.”

In addition to killing off any ants that feed on the sweet, sugary bait syrup, when scouts track the liquid back to the colony it kills larvae and helps control the population.

4. Make the Outdoors Appealing

Ants provide an important ecological function by aerating soil and providing a source of food for birds, according to Gangloff-Kauffman. To keep them outdoors, consider the food sources outside the house. “Aphids, which are little insects that live on plants, excrete honeydew, a sweet substance left on plants,” she says. “Ants feed on that honeydew, but if a landscaper or homeowner sprays outdoor plants for aphids, they’re also killing off an outdoor food source for ants.”

That has the potential to drive them into your house in search of new sources of nutrients. Indoor houseplants, particularly tropical varieties, are very appealing to ants. Aphids that feed on indoor plants excrete honeydew, too, which resembles white scale on leaves. Wipe leaves clean to eliminate the food source for ants, and consider placing aphid-killing plant spikes in the soil of any houseplants.

5. Stay Away From Sprays

You might be tempted to apply a bug barrier spray around the foundation of your home to discourage entry, but Consumer Reports experts don’t recommend it. For starters, the spray wears off and addresses only one potential source of entry for ants. But there’s even more to our advice.

“I’d argue that insect barrier sprays are both ineffective against ants and complete overkill,” says CR’s Hansen. “Worse, some of these sprays contain chemicals that are endocrine-disrupting compounds, which can alter our hormones. Similar compounds have been linked to neurobehavioral effects in children, including reduced IQ and increased rates of ADHD, even at the low levels you’d be exposed to when spraying your house.”

Instead, if you spot a few ants here and there, kill them the old-fashioned way: with a good stomp. They may be scouts, after all, so getting rid of them early means they can’t come back with reinforcements.