Skip to content
Tutorials Center
My learning

Topics

Lesson 15 of 38 ยท Active Directory Structure

Domains, Trees and Forests

Understand the logical structure of Active Directory: domains, domain trees, forests, naming contexts, trusts, functional levels and how to plan a single-domain design.

Active Directory organizes information in three nested levels of boundary: the domain, the tree and the forest. These words describe security and administration boundaries, not just names, and getting them right is the foundation of every AD design.

This lesson explains each level, the naming contexts that hold their data, the trust relationships that connect domains, and why most organizations today choose a very simple layout. A Python stand-in turns a list of domain names into the structure of trees in a forest.

Domains

A domain is a collection of objects (users, computers, groups) that share a common directory database, security policies and trust relationships. It has a DNS name such as corp.example.com and a NetBIOS name such as CORP. Properties:

  • All domain controllers in the domain hold a replica of the domain's data.
  • Password and account lockout policy are set per domain (with exceptions via fine-grained policies, see Administration).
  • Administrators of the domain can manage all of its objects, subject to delegation.
  • The domain is a replication boundary for its own data.

Its LDAP base DN comes from the DNS name: corp.example.com becomes DC=corp,DC=example,DC=com.

Trees

A domain tree is a set of domains that share a contiguous DNS namespace. If example.com is the root domain, then sales.example.com and emea.sales.example.com are child domains in the same tree. Child domains automatically get a two-way transitive trust to their parent, so users in any domain of the tree can be authenticated and granted access in the others.

Forests

A forest is one or more trees that share a single schema, configuration and Global Catalog. It is the real security boundary of Active Directory. Key facts:

  • The first domain created is the forest root domain.
  • Separate trees in the same forest use different, non-contiguous DNS namespaces: example.com and example.net can be two trees in one forest.
  • All domains in a forest share the schema and configuration naming contexts.
  • Two-way transitive trusts between all trees' roots are created automatically.
  • Enterprise Admins and Schema Admins exist in the forest root.

Domain, tree, forest

Domain Users, policies, one database.
Tree Domains with one DNS namespace.
Forest Trees sharing schema and config.

Forest = the true security boundary

1 / 2
flowchart TD
    subgraph Tree1["Tree 1: example.com"]
        R["example.com (forest root)"] --> S["sales.example.com"]
        R --> H["hr.example.com"]
        S --> E["emea.sales.example.com"]
    end
    subgraph Tree2["Tree 2: example.net"]
        N["example.net"]
    end
    R <--> N

Figure: one forest with two trees; trusts between the roots are created automatically.

Naming contexts (directory partitions)

Each domain controller stores several naming contexts (partitions) that are replicated to different sets of servers:

Partition Example DN Replicated to Holds
Domain DC=corp,DC=example,DC=com DCs of that domain Users, computers, groups, OUs
Configuration CN=Configuration,DC=example,DC=com Every DC in the forest Sites, services, partitions
Schema CN=Schema,CN=Configuration,DC=example,DC=com Every DC in the forest Class and attribute definitions
Application (DomainDnsZones, ForestDnsZones) DC=DomainDnsZones,DC=corp,... Chosen DCs AD-integrated DNS zones

You can list them from the Root DSE using namingContexts, defaultNamingContext, configurationNamingContext and schemaNamingContext.

Trusts

A trust lets users of one domain be authenticated by another. Types:

Trust type Direction and transitivity Typical use
Parent-child two-way, transitive Automatic inside a tree
Tree-root two-way, transitive Automatic between trees in a forest
Forest trust one- or two-way, transitive between forests Merge or partner organizations
External one- or two-way, non-transitive A single domain in another forest or an old NT domain
Shortcut one- or two-way, transitive Speeds up authentication between distant child domains
Realm one- or two-way Link to a non-Windows Kerberos realm

Trust direction describes who trusts whom: in a one-way trust where domain A trusts domain B, users from B can access resources in A, but not the opposite way. Trusts do not grant access by themselves; they only allow cross-domain authentication, and you still need to give the permissions.

Newer security guidance restricts SID history and enables selective authentication on trusts to limit what can cross a forest boundary.

Functional levels

The domain functional level and forest functional level specify the oldest Windows Server version of any domain controller they must support. Raising them unlocks features, for example the AD Recycle Bin (forest level Windows Server 2008 R2) and protected users or authentication policies (2012 R2). You cannot go back easily, so raise only when all DCs are updated and you have a backup.

Single domain or many?

Early designs used many domains to delegate control or to reduce replication traffic. Those reasons mostly disappeared: OUs delegate control and replication works well over modern networks. Current advice:

  1. Use one forest and one domain unless you have a real need.
  2. Add OUs for delegation and Group Policy.
  3. Use separate forests when you need genuine isolation (for example, a high-security admin forest, an acquired company or a merger staging area).
  4. Use a separate child domain only for strong regulatory or autonomy reasons.

Never name your internal domain with a name you do not own (like corp.local is common historically, but unregistered names cause certificate and DNS problems). Use a subdomain of a name you own, such as ad.example.com.

From domain names to a forest (Python stand-in)

This stand-in takes a list of domain DNS names, builds the parent-child structure, finds the tree roots and prints them. It also converts each name to a base DN.

Python Domains into trees (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The forest root is the first domain created; the others in roots are additional trees. Their DN style matches what you read from defaultNamingContext.

Counting trust paths

A tree of domains with transitive two-way trusts needs far fewer explicit trusts than a full mesh. This stand-in counts both.

Python Why transitive trusts help

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the true security boundary in Active Directory?

    Because the schema, configuration and trust model are forest-wide, the forest is the real boundary.
  2. 2. Which two naming contexts are shared by every DC in the forest?

    Configuration and Schema replicate forest-wide; the domain partition replicates only inside its domain.
  3. 3. Are parent-child trusts in a tree created automatically?

    AD creates two-way transitive trusts between parents and children and between tree roots.
  4. 4. What is the usual advice for most organizations?

    Simpler designs are cheaper and safer; OUs handle delegation and policy.

Summary

  • A domain is an administrative and replication unit; a tree shares one DNS namespace; a forest shares schema and configuration.
  • The forest is the real security boundary.
  • Each DC holds domain, configuration, schema and often application partitions.
  • Trusts allow authentication across domains; direction and transitivity matter, and access still needs permissions.
  • Prefer one forest and one domain with OUs unless isolation requires more.

Next: Organizational Units and Containers