I have had some success using fox urine to deter rats and mice from areas that I can not use traps or poisons in. You can find it at Walmart or other places that sell hunting supplies. It doesn't take much just a few drops at the points of entry. It is not a permanent fix but will make them avoid that area till it washes away or they find a new access.
I have done this before to keep rodents out of the fenced area for my dogs so I could trap or poison them in other areas.
My understanding is that rats/mice are everywhere.
They will congregate and breed where there is available food water, and shelter.
Look closely around any fast food restaurant and you will see rat bait stations.
They will eventually come, the idea is to prevent them from establishing a colony.
If you see 1, there are probably fifty.
If you see two or more holes, expect dozens.
Keeping a rat trap/bait station baited 24/7 hopefully keeps the population from establishing near your food source. Once established, they are very difficult to eliminate.
Remember, chickens don't attract rats, food does.
That said, I fabricated black 6 inch circular x 18" long drainage plastic pipe as a bait station.
Placed along the outside of my coop, looks like drainage pipe (not unsightly).
I put a t fitting in the center, capped, for easy viewing once a week.
Inside I maintain commercial rat poison.
My run has food scraps 24/7.
My coop has food access 24/7.
Water access 24/7.
The best solution is to secure your feed and I use a nipple watering system as well - like others have said sometimes water alone can attract pests. If your feeder is outside, you can use a chicken step up feeder system where when the chicken steps on the ledge it open the door and allows access to feed.
I have a gravity feeder in the coop that is elevated off the ground - I thought it was rat safe but it turns out they learned to jump into the holes cut out for the chickens to stick there head in to eat. They would sit in the tube chowing down all night and pooping in there which is how I found out I had a problem. I have since put a chicken controlled access door on their coop and small enough wire mesh on any openings so that when night falls and the chickens go to bed, rats cannot access the coop at all. Now if you are tossing food out in your run that is too much for the chickens to eat in a single day you will still have a rat problem.
After securing the coop I baited rats with a commercial rat poison over the course of several weeks (enough time for the poison to reach lethal levels in the rats eating it). I then maintained several rat traps in high traffic areas which over the past month have had 0 rats caught - the first week I got 1 or more rats each night. I went to snap traps because of cost mostly but also using commercial poison endlessly will eventually cause super rats that evolve immunity to anticoagulant based poisons.
I had a similar problem this season. Traditionally I would have a rat or two each season. This season I had a full on infestation. In talking dozens. Ultimately I got some safe bait stations from a pest control guy. They allow the rats to get in and eat the poison but are designed in such a way that cats, birds, chickens, etc can't access the baits. I put a little peanut butter in there at first to speed the process along. The Rays eat and go back to their nests to die. They worked great and eliminated (literally) the problem in about one week with no dead rats laying around. I highly recommend it.