Hello!
I am Howar Rivas from Fairfield, CA.
For me one of the best ways to keep ants out of hummingbird feeders is to use an ant moat.
My brother had made a moat for our hummingbird feeder to keep ants out.
He had cut a water bottle in half, drilled a hole in the bottom just big enough to fit the coated wire that holds the feeder on the hook.
Then he had fed the wire through, set the moat on top of the feeder, and then sealed the hole in the water bottle so no water would leak out.
This is the best way to keep the ants out.
Still, if you found some ants then you can use some ant repellent by consulting some professional pest controller. A pest control in Fairfield or other professionals in your local area will strategize how to deal with them by first identifying what types of ants you may have.