There are two species of rats that people are most likely to come into contact with, in and around their homes; Norway rats and Roof rats. Each species has a preference to the type of habitat they prefer and where it is most likely that people will encounter them; arboreal (elevated areas) and terrestrial (underground or within low lying vegetation). Although they may have these preferences, they are not limited by these preferences. They will nest in the safest available areas. Norway rats are a terrestrial rat and Roof rats are, as their name suggests, arboreal rats.
Roof rats live in various types of trees like cypress, yucca, and palm trees. They will also be attracted to higher levels of homes like attics, rafters, and roofs. They will access these areas by way of trees that are close to the home. They have also been seen nesting in vegetation such as shrubs and tall grasses.
Norway rats are known to be a burrowing species of rats. They like to build their nests along the edges of homes or in clumps of vegetation. Under the edges of sidewalks and patios is also an option if they feel that it is safe and secluded enough.