Delegating a Subdomain

6.2.1 Problem

You want to delegate a subdomain of your zone to a set of name servers.

6.2.2 Solution

Add NS records to your zone's data file delegating the subdomain to the name servers. For example, to delegate the subdomain to the name servers and, you'd add these two NS records to the bar.example zone data file: IN NS IN NS

In this example, you'll also need to add an A record for, even though the name server's A record would normally appear in the zone: IN A

Without the A record -- called a glue record -- another name server that was referred to would not be able to follow the referral, since in order to find's address, it would need to query That's like trying to find someone's telephone number by calling and asking.

6.2.3 Discussion

The simplest test for determining whether you need to include a name server's A record with delegation is to check whether the domain name of the name server ends in the domain name of the subdomain being delegated to it. If so, you need to include an A record for the name server.

The name servers that the subdomain is delegated to need a zone data file for the subdomain and a zone statement configuring them as authoritative for the zone. So, on and, you'd expect to find a zone statement like this:

zone "" {
 type master;
 file "";

Of course, one of the name servers is probably a slave for

6.2.4 See Also

Recipes Section 1.16 and Section 1.17, for instructions on configuring a primary master and a slave name server for a zone, and "How to Become a Parent: Creating Subdomains" in Chapter 9 of DNS and BIND.

Getting Started

Zone Data

BIND Name Server Configuration

Electronic Mail

BIND Name Server Operations

Delegation and Registration


Interoperability and Upgrading

Resolvers and Programming

Logging and Troubleshooting


DNS & BIND Cookbook
DNS & BIND Cookbook
ISBN: 0596004109
EAN: 2147483647
Year: 2005
Pages: 220
Authors: Cricket Liu © 2008-2020.
If you may any questions please contact us: