To install a DNS tree service, you build a hierarchy of DNS servers that share a contiguous namespace: a root zone that delegates to top-level or organizational zones, which in turn delegate to subdomains. On modern Linux you install BIND 9 (or a comparable authoritative server), create the root zone file, point the server at it, then add each child zone with NS records and A/AAAA glue records in the parent. The install is only "done" when every delegated name resolves—from the root through each level—by querying the servers you configured, not by trusting a single dig that happens to return an answer.

The procedure below assumes a small private DNS tree you control end to end, such as example.internal with regional and departmental subdomains. The same mechanics apply to a public tree, but public trees require registrar delegation and registry checks that fall outside your server. I'll flag where those boundaries sit.

What "DNS Tree Service" Actually Means Before You Install Anything

DNS is a tree because every fully qualified domain name reads right to left: host.sales.nyc.example.internal. walks down from the invisible root (.), through internal, example, nyc, sales, and finally the host. The "tree service" is the collection of authoritative servers that each own one slice of that path—the zone—and delegate the next slice downward with NS records. The root servers own the root zone; TLD servers own their TLDs; your internal root owns internal. and delegates example.internal. to a child server, and so on.

Installation therefore has two halves that people often conflate. The first is getting software running and listening. The second—the one that actually makes a tree—is producing a coherent chain of zone files where each parent names its children's name servers and each child agrees about its own identity. A server that answers for example.internal but is never named in the internal. zone is not part of the tree yet; it's a standalone authority nobody can reach through delegation.

The most common mistake I see in private installs is treating the top zone as the "root." If you name a zone internal and never create a literal root (.) zone, resolvers configured to use your server as their only name server will still try to start at ., find nothing, and fail on the first lookup outside your namespace. A true private tree needs a root zone file—even a tiny one—plus root.hints and a named.conf that declares it authoritative.

Prerequisites: Machines, Names, and Authority

Before touching configuration, settle these decisions, because changing them later means rewriting delegation records everywhere:

Server roles. Plan at least one authoritative server per zone and, for anything beyond a lab, a second one. The root and each child can share hardware in a test tree, but production trees want separated failure domains. Two servers for the root and two for each child is the classic minimum.

Namespace and zone cuts. Decide exactly which labels are zones (served by a distinct set of NS records) and which are just records inside a zone. example.internal could be one zone with nyc and sales as ordinary subdomains, or nyc.example.internal could be its own delegated zone. Delegation exists where you need separate administration, separate servers, or separate replication—not for every label.

Addresses and glue. Assign static addresses to each server. For any child whose name servers live inside the child's own zone (in-bailiwick), the parent must carry glue A/AAAA records; otherwise resolution can loop and fail. For example, if ns1.nyc.example.internal is the name server for nyc.example.internal, the example.internal zone must include that name server's address.

Software and version. BIND 9 is the reference implementation and the easiest to reason about for building trees; Knot DNS, NSD, and PowerDNS are credible alternatives with different configuration syntax. Recent BIND 9 releases are the sensible baseline as of late 2026; confirm your distribution's supported version rather than pinning to a number from memory. You need root (or sudo) privileges and a firewall you can adjust.

Time and source of truth. All servers need working time synchronization, and you should decide whether zone data is hand-edited files or generated from a source of truth. For an install, start with files; automation can come after the tree resolves correctly.

Success at this stage means you have a written map: every zone name, its authoritative servers, their addresses, and who delegates to whom. Everything below is a mechanical translation of that map.

Step-by-Step: Building the Tree on a Single Server First

Install on one machine before splitting roles. A single-server tree that resolves correctly is far easier to debug than four machines failing at once, and every artifact you create gets reused when you distribute.

1: Install the server package. On Debian/Ubuntu, sudo apt install bind9 bind9-utils; on RHEL-family systems, sudo dnf install bind bind-utils. Check the binary reports a version (named -v) and that the service is enabled at boot. Expect a working but default-configured server; it likely listens only on localhost until you change named.conf.

2: Choose a working directory and layout. Convention places zone files under /etc/bind/zones/ or /var/lib/bind/, with configuration includes in /etc/bind/named.conf.local and options in named.conf.options. Create the directory and confirm the named user can read it—permission errors here are the single most common cause of "zone loads fine, then doesn't."

3: Write the root hints file. For a private tree, root.hints lists the root zone's own name servers with addresses. Use names inside your namespace—for example a.root.internal. and b.root.internal.—and their static addresses. This file tells the server where the root is; it must match the root zone's NS set exactly.

4: Create the root zone file. The root zone is small: SOA, NS records for the root servers, glue A/AAAA for those servers, and one NS delegation per top-level zone, plus glue where needed. If your tree starts at internal., the root delegates internal. to its servers. Keep the SOA serial disciplined from the first edit—use YYYYMMDDnn or a monotonically incrementing integer, and remember every change needs a bump.

5: Create the internal zone and the example.internal zone. The internal zone holds its own SOA/NS records and delegates example.internal. to the child servers, with glue if those server names sit inside example.internal. The example.internal zone holds SOA/NS, the glue names for its own servers, and normal data: hosts, mail, services. Repeat for each delegated level such as nyc.example.internal.

6: Declare every zone in named.conf. Each zone needs a zone "name" { type master; file "/path/to/file"; }; stanza, including zone "." { type master; file ".../root.zone"; };. A file on disk that isn't declared does nothing; a declared file with a syntax error stops the zone from loading.

7: Check syntax before starting. Run named-checkconf for the configuration and named-checkzone for every zone file. Fix every complaint—BIND will refuse or silently skip a bad zone, and skipping is worse because the rest of the tree appears healthy.

8: Start and verify listening. Start the service, then confirm it binds the expected addresses and port 53 (and TCP as well as UDP—large responses and some clients require TCP). A firewall that passes UDP but blocks TCP produces intermittent, confusing failures.

9: Query downward. From the server itself, query the root: dig @127.0.0.1 . NS. Then dig @127.0.0.1 internal. NS, then example.internal. SOA, then a leaf record. Each answer must be authoritative (aa flag) and match your design. If a level returns a referral instead of an answer, that level isn't authoritative for the name you asked about—check which zone actually contains it.

The check that matters most: ask for a name at the deepest level without searching, and confirm you get an authoritative answer rather than a referral chain you didn't intend.

Wiring the Hierarchy: Delegation, Glue, and Authority

Delegation is where trees live or die, so it deserves separate attention from the file editing above.

A parent zone delegates a child by putting NS records at the child's apex name in the parent file. Those NS records name the child's servers; the child zone's own NS set should list the same servers. Mismatches are tolerated by resolvers but cause silent inconsistencies—when the parent says ns1 and ns2 serve the child but the child claims ns3, debugging gets ugly. Make a habit of diffing the two lists.

Glue exists only to break the circular dependency when a name server's name is beneath the zone it serves. If ns1.example.internal serves example.internal, a resolver asking the internal servers for ns1.example.internal would need example.internal resolved first—hence the parent carries the address. Requirements differ by role: the root zone needs glue for any root server named inside a delegated zone, and each parent needs glue for in-bailiwick child servers. Out-of-bailiwick servers (say, ns1.provider.net serving example.internal) need no glue because the resolver can resolve the provider's name independently.

Lame delegation is the classic failure: a parent delegates to a server that isn't actually authoritative for the child. Symptom—queries for the child return referrals or SERVFAIL, and dig +trace shows the chain stopping. Cause—the child server lacks the zone, has a stale copy, or is answering from a different view. Fix by querying the suspected server directly for the child's SOA; if it doesn't return an authoritative answer, the delegation points at the wrong place or the child isn't loaded.

Also decide early whether you need views or split-horizon behavior. Views let one server answer differently depending on the client's source address—useful for private roots that must not leak to the outside. They add real complexity, so skip them for the first install and add them only when there's a concrete requirement.

Splitting Across Servers and Making the Tree Survive Failure

Once the single-server tree answers correctly, distribute it. The cleanest split is one primary (master) per zone and one or more secondaries that transfer the zone via AXFR/IXFR. Each zone's NS set names its servers, and the parent's delegation must match. A secondary is only useful if it's actually listed in the parent's NS records—otherwise resolvers never learn it exists.

Configure transfers explicitly: restrict AXFR by source address in allow-transfer, and on secondaries point masters at the primary's address. Verify transfers by checking the secondary's serial after a primary change; if the serial doesn't advance, the transfer failed and the secondary is serving stale data, which is worse than being down because it looks healthy.

For the root and each child level, run at least two servers on separate hosts. A tree with a single root server is a single point of failure for the entire namespace—every lookup starts there. If you're building a lab, one server is fine; if anything depends on the tree, two servers per level is the floor, and the failure domains should be genuinely separate (different hosts, ideally different racks or sites).

Propagation timing is governed by TTLs and negative caching. Lower TTLs (300–900 seconds) during the install and for a period after changes, then raise them. Remember that resolvers cache negative answers using the SOA minimum, so a missing record can appear "stuck" for the negative TTL even after you add it.

Reading Results: Verification Queries and Failure Signatures

Verification is mostly disciplined dig use against specific servers, because a recursive resolver's answer tells you little about where the tree is broken.

Query each level directly and read the flags. An authoritative answer carries aa; a referral carries NS records in the authority section and no aa; SERVFAIL means something upstream in the chain failed or a server couldn't load the zone. dig +trace from a resolver walks the chain from the root and prints each step—if it stops at a plausible delegation, the child servers aren't answering authoritatively.

Common signatures and their causes:

Root answers, child times out. Firewall on the child host, or the child server isn't running or isn't listening on the queried address. Referral loops or SERVFAIL at a level. Lame delegation, or missing glue for an in-bailiwick name server. Answer arrives but aa is absent. You asked a recursive resolver that got the answer from cache, or you asked a server that isn't authoritative for that zone. Zone loads interactively but not at service start. File permissions, SELinux contexts, or a relative path that resolves differently under the service's working directory. Intermittent failures under load. UDP truncation with no TCP reachable, or a secondary serving stale data because transfers are blocked.

The success check for the whole install is a scripted sequence: for every zone in your map, query each of its authoritative servers for the zone's SOA and require an authoritative answer with a matching serial. Anything less is a partially installed tree.

Region, Version, and Environment Differences That Change the Install

Most of the mechanics above are stable across BIND 9 releases, but a few environment details vary and are worth checking against your actual system rather than assuming.

Configuration file locations differ by distribution: Debian-family packages historically ship /etc/bind/named.conf with separate include files and run under AppArmor, while RHEL-family packages use /etc/named.conf under SELinux. AppArmor and SELinux profiles both restrict where named may read and write, so a zone file outside the permitted paths fails to load even with correct Unix permissions. Check the audit log or profile before blaming BIND.

Alternate servers change syntax, not concepts. Knot DNS uses a YAML-style configuration with separate zone and remote sections; NSD uses its own nsd.conf and zonefile syntax; PowerDNS separates the authoritative server's database-backed zones from its configuration. The tree structure—root zone, delegations, glue, NS-set consistency—is identical. If you're installing into an existing environment, match the installed server rather than adding a second implementation just for the root.

Public versus private trees is the biggest scope difference. A private tree rooted at internal. or a company-chosen TLD needs no registrar, but any client resolving through it must use your root (via root.hints or a forwarder). A public tree requires registrar delegation for each registered domain and TLD-level records you don't control; you install your zones and wait for delegation, and the registry's checks—not yours—decide whether the delegation is live. Don't expect your local dig to confirm a public delegation until it propagates.

Finally, forwarders and recursion interact with trees. A server that is authoritative for your root and also recurses for clients is doing two jobs; if it forwards to public resolvers for names outside your tree, make sure it doesn't accidentally forward your private root's namespace upward. Split the roles when in doubt: authoritative servers answer only for their zones, and a separate resolver handles client recursion and points at your root for internal names.

Stop Conditions and When To Bring In Help

Stop and reassess rather than pushing forward when: zone transfers fail repeatedly between hosts you don't fully control; your tree must interoperate with an organization's existing DNS infrastructure whose change process you don't own; you're being asked to publish a tree that will be reachable from the public internet; or security policy requires DNSSEC signing and you haven't validated the signing and key-rollover process. Those situations need the network or security team that owns the surrounding infrastructure, because a mistake there affects more than your test tree.

A practical rule: you can safely install and iterate on a private tree you alone control. The moment the tree touches shared infrastructure, public delegation, or production authentication, get the owner of that infrastructure involved before making changes—not after something breaks.

The install is complete when the map matches reality: every zone loads, every delegation points at servers that answer authoritatively, every in-bailiwick name server has glue, and a scripted check of every zone against every authoritative server passes. Until then, treat the tree as under construction and keep TTLs low.