I keep rodents out of our food okay in our coop and run so far. My food dispenser is out in the covered run. The food and supply bins are locked under the coop in a cabinet.
I have small sized hardware cloth/ welded wire mesh on all the openings and then it is covered with aluminum screening, way too small for rats or mice to get into. The small hardware cloth should be sufficient for windows and doors. Anything bigger than a 1/2 inch kind of opening in wood, they will try to make bigger and squeeze in.
Make it difficult for the rats to dig under and in. My coop is on a cement slab. You could bury more hardware cloth around the perimeter. Another option is sink large brick pavers around the base. These efforts also make it more predator proof in the process.
Make all the wood and doors fit snugly and meet up tight. The rodents will make any small holes or spaces bigger to get in if they know there is a food source.
Make sure no food is spilled outside to attract rodents.
On side note: The aluminum screening on my coop wasn't added for rodent proofing. It is for mosquitoes. We have had numerous cases of West Nile Encephalitis locally, and a lady a couple of blocks over died of it couple years back. For about three years our crow population was almost non-existent. The first year west nile was bad, animal control collected at least a dead bird a week at the pond across the street. The virus even got a coopers hawk. It was awful finding such a gorgeous bird dead in the gutter. I am taking no chances with our hens health. The screening also has kept flies out.