How to Get Rid of Ants in Your House: What Attracts Them and What Works
You wipe the counter, and an hour later a line of tiny ants is back at the same corner. Spraying the ones you see feels good, but it rarely ends the problem. The workers you see are a small part of a colony that lives somewhere else. Getting rid of ants for good means finding what is drawing them in, blocking how they enter, and using bait that reaches the nest. Here is how to deal with an ant problem step by step.

Is it a few ants or an ant infestation?
A few scouts on the counter after a spill are a small problem. An ant infestation looks like ants showing up every day, in several rooms, or coming out of a wall, outlet or baseboard. Ants that keep returning to the same spot mean a colony is nearby. Outdoors, you can often follow a trail back to the ant nest, which may be in soil, under a stone or slab, or in a rotting log. Knowing where the ants live tells you where to put bait.
Why ants come inside
Ants are looking for food, water and shelter. Scouts find a crumb or a sweet spill, go back to the nest and leave a scent trail, and soon you have an ant trail across the kitchen. Weather can push them in, too, since heavy rain or dry spells send colonies looking for moisture.
The usual attractions are:
- Crumbs, sticky spills, pet food and unwashed dishes.
- Leaks under sinks, around dishwashers and near bath fixtures.
- Sweet sources outdoors. UC IPM points to plants infested with aphids, which leave a sweet liquid ants collect.
- Mulch, plants and branches touching the house, which give ants a bridge.
Step 1: Take away what draws them
This is the part that keeps ants from coming back, so do it before anything else.
- Wipe counters and sweep daily. Wash sticky jars, honey and syrup bottles.
- Store pantry food, sugar and pet food in sealed containers. Pick up the pet bowl after meals.
- Take out the trash and rinse recycling.
- Fix leaks and dry wet spots. Standing water is as good as food to ants.
Step 2: Clean the trail, then block the way in
Wipe the trail with soap and water so the scent trail is gone. Then look for where they enter. Watch the line to see where it comes through, often a gap around a window, a door threshold or a pipe. Seal the gap with caulk so ants cannot enter the house there. UC IPM also advises keeping mulch and plants about a foot back from the foundation and trimming branches that touch the house.

Step 3: Use bait, not just spray
The best way to get rid of ants that already got in is bait, with cleaning and sealing alongside it. Hardware stores sell bait labeled as an ant killer, and sprays often sit next to them, so the choice matters.
Spray kills the ants it touches, but it will not get rid of the ants back at the nest. UC IPM says sprays give only temporary control, and that spraying ants indoors will not stop more ants from coming in. Ant bait works differently. Foraging workers carry a slow-acting bait back to the nest and share it, which is how the colony itself gets reached. That is why bait is the usual way to kill ants for good.
- Put bait stations on the trail. Place them near where ants are walking, not on top of the line you sprayed. Leave the ants alone so they can carry the bait home. The goal is to reach the nest, not just the ants you see.
- Expect ants at first. It can take 5 to 10 days to see fewer ants, according to UC IPM. More ants at the bait early on means it is working.
- If they ignore it, move it or switch. Some ants prefer sweet bait and others want protein or grease. UC IPM suggests moving the stations or trying a different bait product.
- Read the label. Follow the directions exactly, and keep bait stations out of reach of children and pets. Your local poison control center can answer questions about a product label.
Outdoors, UC IPM notes that wiping out ants entirely from a yard is unrealistic. The goal is to keep them out of the house, using bait near trails and nest openings and sealing entry points.
How to keep ants out and prevent ants from coming back
Once the trail is gone, a few habits help prevent ants. Keep the sealed food storage and daily wipe-downs going, check under sinks for slow leaks each month, and re-seal gaps that open up around windows and doors. If ants enter through a new spot, treat it like the first time: clean the trail, seal the gap and put bait nearby.
Carpenter ants and black ants
Most ants at your counter are a nuisance. Carpenter ants are different, because they nest in wood. Extension guides from the University of Minnesota and the University of Nebraska explain that carpenter ants usually start in damp or decayed wood, so leaks from roofs, gutters and flashing invite them in. Large black ants, especially around a window or bath, are worth a closer look.
- Signs: piles of sawdust-like debris, rustling in a wall and big black ants at night in spring and summer. Sawdust suggests activity but does not prove you found the nest.
- Find the moisture. Repair leaks and replace decayed wood. Store firewood off the ground and away from the house, and trim branches that touch the roof or siding.
- Bait only works with the right product. Extension guidance says bait labeled for carpenter ants can eliminate most colonies once the nest is located, and many store baits do not control them. If you cannot find the nest, or the ants are inside walls, this is a job for a professional.
Fire ants and other species vary by region, so ask your local extension office what to do where you live.
When to call a pro
Call a licensed pest control company if you see carpenter ants or damaged wood, if the ants keep coming back after weeks of bait and cleaning, or if a nest is inside a wall. For a short list of signs that it is time to call, see our guide to when to call pest control professionals. If you are also seeing mice, our post on keeping mice out covers sealing the same gaps.
Sources: UC Statewide IPM Program (Ants in the Home; Ants, home and landscape); extension carpenter ant guidance from the University of Minnesota, University of Nebraska-Lincoln, University of New Hampshire and Rutgers.