Plenty of California homeowners have heard that planting the right shrubs around their foundation will send rats packing, and the idea makes sense on the surface. The truth, though, runs in the opposite direction: dense, ground-level vegetation is exactly the kind of cover rats look for, not something that drives them away.
Understanding what your foundation planting is actually doing for local rodents is the first step toward a yard that genuinely makes life harder for them.
The shrub is not the repellent

Gardening advice about rat-repelling shrubs has been circulating in California for years, and the aromatic angle sounds convincing. Lavender, rosemary, sage, and juniper all produce strong scents, and if those smells bother people, the logic goes that rats must hate them too.
The problem is that the evidence does not back that conclusion up.
UC Integrated Pest Management guidance on rats treats dense, ground-level vegetation as a liability rather than a defense, because thick plantings give rats concealment as they move between shelter and food. The guidance recommends thinning foundation beds and separating shrubs from buildings, which is the opposite of surrounding your home with fragrant hedges.
Researchers have tested essential oils and plant metabolites in controlled settings, and a systematic review of plant-derived rodent repellents found inconsistent results across laboratory, enclosure, and field studies, with few registered plant-based repellents currently available. What works on rats in a small enclosure does not reliably translate to a living shrub growing in an outdoor California yard.
Pyracantha and juniper deserve special mention here, because they appear on rat-repellent plant lists fairly often. UC IPM specifically names both as shrubs whose dense canopies should be pruned away from structures, not planted against them.
Neither species produces a chemical barrier; both can produce excellent cover when left untrimmed.
The reframe worth keeping is this: an open, well-maintained foundation bed can reduce hiding cover and make rat activity easier to spot sooner. That is a real advantage.
Calling it repellence, though, overstates what landscaping alone can do.
Open space removes the cover rats use

Rats are not wandering your yard randomly. They move along predictable routes that offer concealment, and a dense foundation planting gives them exactly the kind of protected corridor they prefer.
When shrubs touch the building wall, overlap one another, or grow so full that you cannot see the soil surface beneath them, the foundation edge becomes a travel highway that is nearly invisible from the yard.
Walk your foundation planting and look for three specific problems: shrubs whose branches contact the stucco, siding, or foundation; neighboring shrubs whose canopies overlap so tightly that you cannot see through them; and beds where the soil surface and foundation itself are hidden from view at normal standing height. Any of those conditions makes rat activity harder to detect and easier to sustain.
UC IPM recommends creating at least 2 feet of separation between shrubs and buildings and between individual shrubs as a way to reduce cover and improve visibility. That spacing is not a construction standard or a fire code.
It is a habitat-modification target, and in wildfire-prone parts of California, local defensible-space rules from CAL FIRE or your fire district may require more clearance than that, so always check those requirements first.
Thinning a foundation bed changes what the space offers to a rat: less concealment, more exposure, and a soil surface you can actually inspect. An open planting does not guarantee that rats will leave, and it does not function as a repellent.
What it does is remove a significant part of what makes the foundation edge attractive as a travel route in the first place.
If you find yourself reluctant to thin plants you have spent years growing, start with the shrubs closest to the building wall. Even pulling one overgrown specimen away from the foundation and cutting back its nearest neighbor can open a section of bed enough to make monitoring realistic.
Pruning turns a foundation bed into a visible edge

Pyracantha and juniper are the two shrubs most commonly called out by UC IPM when it comes to rat-friendly foundation planting. Neither plant is inherently a rat magnet or a rat deterrent.
What matters is how they are maintained and whether their canopies touch the building or bridge the gap between neighboring plants.
A pyracantha left to grow against a wall creates a dense, concealed channel along the foundation that rats can use day or night with very little exposure. The same plant, selectively pruned so its canopy clears the building by two feet and does not merge with the shrub beside it, becomes something you can actually walk up to and inspect.
You can see the soil surface, check for droppings or burrows, and identify gnaw marks on wood trim or irrigation hardware.
Pruning for visibility is different from pruning for shape. The goal is not a formal hedge line.
The goal is a foundation edge where you can crouch down and see clearly from one end of the bed to the other. UC IPM specifically recommends pruning dense pyracantha and juniper canopies away from structures and from one another to reduce concealed travel routes along the foundation.
Keep plant health in mind as you work. Heavy pruning at the wrong time of year can stress some species, so check guidance for your specific plants before cutting significantly into old wood.
And as with spacing decisions, any pruning that removes vegetation near the structure must remain consistent with local fire-district requirements, which may call for additional clearance beyond what rat-habitat reduction alone would suggest.
Pruning is habitat modification, not repellence. A well-maintained, inspectable foundation bed is more valuable than any aromatic species planted against the wall.
Roof rats change the route

Ground-level pruning and spacing improvements can open the foundation edge considerably, but they will not address a roof-rat problem. California has both Norway rats and roof rats, and conflating the two leads to control plans that miss half the population.
Norway rats are largely ground-oriented. They tend to follow wall edges, dig burrows near foundations, and travel low routes between food and shelter.
The foundation-bed modifications described in the previous sections are directly relevant to Norway-rat activity. Roof rats are climbers.
They use ivy, star jasmine, honeysuckle, bougainvillea, and other vining plants to move along exterior walls and reach rooflines, attic vents, and overhangs. They also travel along fence rails, utility lines, tree branches, and pipes well above ground level.
UC IPM recommends thinning or removing climbing plants where feasible and removing tree limbs within 6 feet of roofs to cut off elevated access routes. A wall covered in star jasmine that has not been thinned in several years is a roof-rat highway regardless of how open the soil-level foundation bed looks.
Inspect the vertical surfaces of your home as carefully as you inspect the ground-level planting. Look for vines that have grown into weep screeds, fascia gaps, or soffit edges.
Check whether any tree canopy extends close enough to the roofline that a rat could step from a branch onto the roof. Fence rails that run close to the building wall are another common route that gets overlooked in a ground-focused inspection.
Identifying which species is present matters for trap placement later. Signs of roof-rat activity – droppings along fence rails or in attic spaces, gnaw damage near the roofline, or sightings on elevated structures at night – call for elevated trap placement rather than ground-level traps alone.
Treating the yard as if only one rat species exists is one of the most common reasons control efforts fall short.
Sanitation and exclusion close the real invitations

An open, well-pruned foundation bed reduces cover, but rats are not just looking for somewhere to hide. They are looking for food, water, and a way inside.
If those three things remain available, a thinned planting is a minor inconvenience at best.
Food removal is where most prevention plans have the biggest gap. Fallen citrus, avocados, figs, and other fruit left on the ground are among the most reliable rat attractants in a California yard.
Garden debris piled against the fence, unsecured garbage cans, outdoor pet food bowls left out overnight, bird-feeder spillage that accumulates under a feeder, open compost bins, and stored animal feed in plastic bags or lightweight containers all qualify as food sources that rats will find and return to.
CDC guidance on rodent prevention recommends keeping outdoor food away from the home, clearing brush and weeds, and keeping vegetation trimmed. Combine that with picking up fallen fruit daily during fruiting season, moving bird feeders away from the foundation, and switching to a secured metal or heavy-duty plastic compost bin.
These are not dramatic changes, but they remove the reason a rat has to stay in your yard.
Exclusion is the part of prevention that tends to get delayed because it requires getting down close to the foundation. UC IPM describes exclusion as the most successful and longest-lasting rat control strategy, and it focuses on sealing openings larger than one-quarter inch.
Rats can compress their bodies through surprisingly small gaps, and they can chew through foam, plastic, wood, and standard caulk.
Work around the full perimeter of the foundation and check every point where something passes through the wall: plumbing pipes, electrical conduit, irrigation lines, dryer vents, crawl space vents, weep screeds, and door and window frames. Gaps around garage doors are a common entry point that gets ignored.
Use galvanized hardware cloth, sheet metal, or commercial copper mesh to seal openings, and secure the material so it cannot be pushed aside or chewed through at the edges.
Sanitation removes the invitation. Exclusion closes the door.
Neither step alone is as effective as both together, and neither replaces the other.
Monitor first, then use traps when signs justify control

A single rat crossing the yard at dusk is not proof of an infestation. Rats are opportunistic and wide-ranging, and one sighting can reflect a transient animal moving through the neighborhood rather than an established colony living under your deck.
That sighting should prompt a thorough inspection and the preventive steps described above, but it should not automatically send you to the hardware store for poison.
Monitoring means looking for repeated, physical evidence of activity over time. Droppings near the foundation, along fence rails, or in the garage are more meaningful than a single sighting.
Gnaw marks on wood trim, irrigation tubing, or stored items indicate active use. Burrow entrances with smooth, compacted openings near the foundation or under dense shrubs point to an established ground-level presence.
Nesting material in a sheltered corner of a shed or garage suggests a rat has found a reason to stay.
EPA’s integrated pest management framework recommends identifying the pest, monitoring activity, and applying an action threshold before escalating to direct control. The appropriate threshold depends on your household, your site, and what the evidence actually shows.
When monitoring reveals active signs that justify direct control, rat-sized snap traps are the method UC IPM identifies as the safest, most effective, and most economical option. Place Norway-rat traps along walls and near droppings, burrows, or other ground-level signs, with the trigger end toward the wall.
Place roof-rat traps on elevated routes: fence rails, overhead pipes, ledges, shelves, or tree branches where you have seen activity or found droppings.
Use enough traps to cover the active routes you identified during monitoring. A small, pea-sized amount of bait secured to the trigger – peanut butter, dried fruit, or nesting material – works better than a large loose pile.
UC IPM trap placement guidance recommends paired traps when placing them parallel to a wall, which increases the chance of a catch regardless of which direction the rat is traveling. Every trap must be placed where children, pets, birds, and other wildlife cannot reach it.
Trapping is a response to evidence, not a test of whether your prevention measures worked. If traps are catching rats steadily, that is a sign the population is established and that the exclusion and sanitation steps need a second look.
Clean evidence safely and respect California fire limits

Once you find droppings, nesting material, or urine staining, the cleanup process matters as much as the discovery. Sweeping or vacuuming contaminated material is not a safe option, even outdoors.
Dry disturbance of rat waste can aerosolize particles that carry pathogens, and CDC guidance on rodent cleanup specifically prohibits sweeping or vacuuming droppings, urine, or nesting material.
Put on rubber or latex gloves before touching anything. Saturate the contaminated area with a commercial disinfectant or a fresh solution of one part bleach to nine parts water.
Let it soak for at least five minutes, or follow the product label if it specifies a longer contact time. Then wipe up the material with paper towels and seal everything in a plastic bag before disposal.
Wash your hands thoroughly after removing the gloves, even if the gloves appeared intact throughout the process.
Apply the same wet-disinfection approach to any dead rats you remove from traps. Double-bag the carcass, seal it, and dispose of it in the household trash.
Do not leave dead rats on the ground, where scavengers and predators can access them.
The second safety concern specific to California is wildfire exposure. CAL FIRE’s defensible space guidance identifies the first 5 feet around a structure as the most critical zone for ember protection.
That zone should be free of dead vegetation, wood mulch, and combustible plant material. Vegetation spacing requirements extend outward from there, and local fire districts in high-hazard severity zones often impose standards stricter than the state baseline.
When rat-habitat reduction calls for thinning a foundation bed and fire safety calls for clearing the first 5 feet entirely, follow the fire requirement. A gravel or decomposed granite border in Zone 0 can actually support rat-habitat goals at the same time: it removes the ground cover rats use for concealment, eliminates the ember-ignition risk, and keeps the foundation visible for inspection.
Check with your local fire district before planting anything new within the defensible-space zones, and never let rat-prevention landscaping advice take priority over an active fire-safety requirement.
A less sheltered foundation beats a miracle shrub

No shrub species available at a California nursery reliably repels, excludes, or drives rats away from a home. That claim has circulated widely, but the actual guidance from UC IPM points in the opposite direction: dense foundation plantings can provide the concealment and travel cover that make a yard more useful to rats, not less.
The sequence that actually reduces rat pressure starts with the planting itself. Open the foundation bed so you can see the soil surface and the wall behind it.
Prune dense shrubs so their canopies clear the building and each other. Remove climbing vines from exterior walls and cut back tree limbs that reach within 6 feet of the roof.
Pull food sources, secure garbage and compost, and pick up fallen fruit before dark.
After the habitat work, inspect the foundation for openings and seal them with materials rats cannot chew through. Monitor for physical evidence of activity before escalating to trapping.
When signs justify direct control, use correctly placed snap traps on the routes where activity is concentrated, and keep every trap out of reach of children and pets. UC IPM notes that exclusion remains the most durable long-term strategy, and all of these steps work best together rather than in isolation.
In California, any foundation planting decision also has to be compatible with CAL FIRE defensible-space requirements and your local fire district’s rules. The best plant choice for a California foundation is not a specific aromatic species.
It is a maintainable arrangement that leaves the soil visible, keeps the structure accessible for inspection, and does not create an ember or fire pathway. A foundation you can actually see is the one that works.