Rats are opportunists who love a free meal, so the best way to discourage rats is to keep your chicken coop clean and free from surplus food. Place your feeders in the centre of the run, and make sure the run has a small gauge, toughened galvanised wire so that rats can’t crawl through or gnaw through to get into the run.
Rats can gnaw through tough materials and wood, so a wooden housing area that is raised off the ground offers good protection, as rats cannot access any damp and therefore chewable wooden corners, or burrow underneath the chicken house.
Make sure the area around your chicken coop is free from any uneaten food, as this really is free food for any rodent. Rats are most likely to come and visit the chicken coop during the winter, when other food is scarce. Rats rarely attack chickens as such, but they will take eggs given half a chance.
Also consider where you store your chicken feed. Simply putting it high on a shelf won’t discourage mice or rats; keep your feed in an airtight container with a secure lid, such as a large plastic dustbin or metal container.
If you develop a problem with rats, your local authority should be able will help you deal with it, as rats are classed as vermin.