The best way to avoid invasions of rats is to provide as little harborage/storage as possible that might attract rodents,
Seal as many holes and cracks in the outside of the home as possible through which rats might enter.
The following recommendations should be followed to help prevent rats from seeking the food and shelter provided by your home :
If possible, remove any piles of debris, stones, bricks, etc. near the foundation of the home they serve as harborages to attract rodent.
Seal any hole or crack larger than 1/4 of an inch . Large holes or cracks should be stuffed with steel wool or wire mesh before sealing with caulk or foam, otherwise rodents could chew though to enter.