Some ant types go for traps and others just wont bite.
Depends on the ant and what part of the country you live in.
What part of the country do you live in? What do the ants look like?
We have argentinian ants, which are the worst little @#$%$'s on the planet. They're special in that multiple queens will live in the same nest together, and they will split and combine nests, even repopulating formerly dead nests. They attack and kill wasp nests, termite nests, etc.
Basic ant protection, what I do twice a year:
1: get one of those general insecticides that screws to the end of the hose. Spray all the ground area according to the instructions. Let dry before letting people/animals on the area...once dry the stuff is fairly safe. Dont spray the bushes, trees, shrubs or any open water like ponds, pools, etc.
2: get a jug of 'home defense' type insecticide and a $9 sprayer. Spray in a circuit around your foundation or slab, in any crack in any concrete, the edges of any walkway, and in any areas you see or have seen ants.
3: if you find an ant nest or trail, put some Sevin dust or equiv on the nest or trail and remove once you stop seeing ants. They've now carried this into the nest and killed it. I have a squeeze bottle (for mustard!) that is good for this, and one of those metal pump dusters
4: maintain ant bait traps if they work for you. They do nothing at all for me.
Ants generally move twice a year...they want to be high, dry and warm during your cold/rainy seasons and in the ground during the warm/dry seasons. Trick is to do your spraying just prior to these movements. Easy here in the southwest where you generally know when the first real rains of the season will start for the fall spraying and when the rains have pretty much let up for spring spraying.
If you're dilligent, you can get by with just the sevin dust on the nests and trails, and a can of Raid to spray any baseboard/doorway/wall entries you see inside the house.
Gasoline, bleach and all these other bits are of no help. A large ant nest can be 3-5' deep, 10'+ across, and is usually segmented into multiple chambers against liquid incursion.
Oh yeah...might take you 2-3 years to get them out of a house or out from under a slab or driveway. First thing they do when threatened is move the nest. Thats why the vegetable dust is so effective...they get coated walking through it, take it home, then die.
One last thing...some termites look an awful lot like some ants...you need a big magnifier to tell the difference between one strain of ant we have in my area and a strain of termite.
The above spraying regimen costs me about $50 a year and takes about an hour in the spring and an hour in the fall. No ants in my house.