Like any other animal, rats are attracted to food sources, water, and shelter. Clean up food messes right away, don’t leave pet food out, and secure your garbage to make your home less appealing. Fix leaky pipes and dripping faucets, and declutter spaces that rats might think to nest in.