The best way to deal with a rat infestation is through proper sanitation and maintaining cleanliness. Rats come to homes looking for food, and if it is readily available they will create shelter nearby and become a problem. Collect compost and garbage regularly and deposit them in the proper receptacles. To determine if you have a rat problem, look for rat droppings, listen for scratching noises in the walls, check food to see if it has been nibbled and check your pets to see if they are on high alert. These will all be indications of a rat infestation, in which action can be taken.
Seal exterior cracks in the foundation of the home and the outer walls, repair any holes in drainage and water pipes and ensure doors, screens and windows are all tightly fit. Either do these repairs yourself or hire a general contractor.
Place rat traps in front of holes where rats may enter the building. Bait the traps with nut meat, dried fruit or bacon, as these are effective at luring rats.
Lay toxic bate traps around potential rat habitats. The traps can be purchased in the pest control section of the hardware store.
Consider getting a cat or dog, as these animals are known to scare or kill rats.