The short answer
When fencing near a tree, dig post holes by hand, move posts to avoid roots thicker than about 25mm, and bridge over large roots with a rail or longer panel. Leave a generous gap around the trunk for growth. Check whether the tree has a Tree Preservation Order or is in a conservation area before cutting any roots or branches.
Most of a tree's roots are in the top 600mm of soil and spread well beyond the canopy. That's exactly where fence post holes go. Cutting a large root can damage or destabilise a tree; ignoring a tree can leave you with a post that can't be set properly or a fence that's shoved out of line as the trunk grows.
Check the rules first
Many mature trees are protected. A Tree Preservation Order (TPO) makes it an offence to cut down, top, lop, uproot or wilfully damage the tree – including its roots – without consent. Trees in conservation areas have similar protection, and you must give the council six weeks' notice of most work. Fines can be substantial.
Your council can tell you whether a tree has a TPO. If the tree belongs to a neighbour, you can only cut overhanging branches or encroaching roots up to the boundary, and you shouldn't do anything that kills or destabilises the tree.

Setting posts among roots
Closeboard and post and rail fences are more flexible than panels here, because bays can be built to any width. See types of garden fence.
- Dig post holes by hand with a spade and trowel – never with an auger near trees
- If you hit a root thicker than about 25mm, move the hole rather than cutting the root
- Adjust post spacing, use a shorter panel or a closeboard section that can span further
- Use bolt-down or spike post supports only where the ground is too rooty to dig, and keep panels low
- Avoid pouring large amounts of concrete over root zones
Bridging roots
Where large surface roots cross the fence line, the fence can bridge over them. A gravel board can be cut to sit above the root, or a rail can run across with boards fixed above it. Leave a gap of a few centimetres above the root so it can grow without lifting the fence.
Leaving room for the trunk
Trees get wider every year. A fence built tight against a trunk will eventually be pushed over or embedded in the bark. Leave a generous gap – often 150mm or more – around young trunks, and step the fence line around larger trees rather than fixing to them. Never nail or screw fence parts into a tree. It damages the tree and creates rot.
If you have a leaning fence near a tree already, see how to fix a leaning fence.
Hedges and young trees
If you're planting new trees, keep them back from the fence line so you have room to maintain the fence later. Native hedging along a boundary can be a lovely alternative to fencing near trees – see hedge vs fence.
