Planting a tree 30 feet away from a house is a wise decision if the tree doesn't mature any wider than 20 to 25 feet. While you don't want branches in the mature canopy to scrape against the house roof or facade, you also don't want tree roots crowded or butted against the foundation.
Before planting a tree, do some research to learn about the tree species. Cross-reference it in print literature or an online search using the tree's botanical name and cultivar to discover the tree's expected mature height and width. Assume tree roots grow beyond the reach of the branches in the top 2 feet of soil.
If the tree you wish to plant is known to develop lots of surface roots, such as a red maple or tropical banyan fig, think twice on the planting location. If the planting site must be 30 feet away from the house, avoid all large tree species that mature with a canopy wider than 25 feet. It may not seem problematic until the tree gains size decades later.