Rats produce home damage in many ways. When they chew house wiring, the repairs are expensive and the possibility of a house fire makes it life threatening. Rats can chew through soft metal, so if you choose to encase your wiring use steel conduit instead of plastic or copper. The best way to prevent rat damage of any kind is elimination and exclusion.
Check common areas to make sure you are dealing with a rat. Look for their droppings around all possible water sources including plumbing areas, under and behind the refrigerator, under the dishwasher, behind the washing machine and especially on and around the water heater. Their droppings are large--up to 1/2 inch. They are pill shaped with rounded ends (mouse droppings are small and have pointed ends).
Place a traditional snap trap where they are getting their water but do not set it. Rats shy away from new things in their environment. So bait it with small amounts of peanut butter and allow them to eat from it for a week, and then set it. The downside of using a snap trap is that you have to remove the dead rats. Check the trap regularly and replace the bait when it dries.
Place poison bait such as D-Con near the rats' water source. Bait dries and becomes useless over time. Place it in a sealed envelope and they will chew it open. The downside of poison is that they can die in area that you cannot reach, such as in walls, and you will have to tolerate the smell for several weeks. Check the bait regularly and reseal or replace as necessary.
Seal all cracks and entry points once you are certain you are rat free. A full grown rat can enter through a space as small as 1/2 inch. Use a combination of wire mesh or steel wool and insulated foam or caulk to fill gaps around plumbing and wire entries. Rats climb well, so gaps around eaves need to be repaired as well.
Remove things that attract them to your home. Stack firewood off the ground and away from your home, trim back foliage and clean up leaf and other clutter immediately outside your house.
Eliminate or maintain outside food sources that are potentially attractive to rats. These include bird feeders, water sources such as standing water and plumbing leaks, and fruit trees near your home.