Tree roots will search as far as they can for water, and the only way you can certainly protect your foundation with trees nearby is to install a tree root barrier. These usually consist of an impermeable, strong and flexible material such as rubber, plastic, fibreglass or PVC siding. The most effective root barriers are thin plastic fabric sheets that have dots of herbicide on them. They will prevent the roots from growing any farther without killing the rest of the tree. With some knowledge of how to install a root barrier around your house, you can protect your foundation.
Examine your yard to identify where you need to put the root barrier. Look at the trees in the vicinity, including those in your neighbours' yards, and estimate how tall they are supposed to grow if they are not fully grown. For most trees the roots will grow as far as the trees are tall. Put a root barrier wherever the tree roots will be able to reach your home.
Call your utility companies and have them mark where any power lines or pipes are located. You will want to avoid these during installation of the root barrier.
Choose the kind of tree root barrier you wish to use. It should be at least 30 inches high. The root barriers may be difficult to find, and locating or ordering them online may be the easiest option (see Resource section). Assemble the barrier if necessary, overlapping the edges at least 2 to 4 inches and using a rubber cement compound to glue the sections together. Seal the edges of each section against the other with a liquid nail adhesive material.
Dig a narrow trench 5 feet away from the foundation and 30 inches deep. You may have to saw off the roots from trees that have already made it to your foundation. Avoid any pipes while digging.
Place the root barrier in the trench, ensuring that none of the seams is in a place where the barrier goes around a corner. A corner would weaken the seam and present an opening for the root to grow through. The barrier should be even with the soil level or a little above at this point. Refill the trench with dirt and add water after every 6 inches to make sure the dirt settles properly.
Trim the barrier flush with the ground, if necessary, with tools that will cut through the material. Keep an eye on the barrier each year, cutting any roots that grow over it as you notice them.