It is important to trench all pipes, beams etc. Treat deeper though, and use specialized equipment to do the job properly. To treat the soil along the outside walls of a basement, dig a trench 6 to 8 inches wide and a foot or more deep adjacent to the wall. Then make crowbar, pipe, or rod holes no more than 1 foot apart that extend from the bottom of the trench all the way to the footing. 6-inch layers of soil.
Some houses have both crawl-space and basement foundations.
The basement end next to the crawl space can be difficult to treat, but it must be done. Additions to Structures Areas particularly vulnerable to termite attack are raised door stoops and attached structures such as carports, porches and walkways. Be sure the soil adjacent to the foundation is treated. Don't go around a door stoop or other attachments. It is best to knock a hole in each side of the stoop and clean the dirt, especially any wood, out of the area.