Small Printed Circuit Board

Code, Docs & Tools

BIND: how to delegate a sub-domain to another nameserver


In most of the cases, the DNS configuration for a domain is included in a single zone file and handled by an unique authoritative nameserver (master + slaves).

Sometimes there could be the need to delegate a sub-domain to other nameservers.

Zone configuration

There are different formats that are totally equivalent (with or without the usage of the $ORIGIN directive, using or not unqualified names).

This format could help to keep things clear, but indeed it's just a matter of tastes.

$TTL 3600 $ORIGIN @ IN SOA ( 2017090101 ; Serial 10800 ; Refresh 1800 ; Retry 1209600 ; Expire 3600 ; Negative Cache TTL ) @ IN NS @ IN NS @ IN A www IN A $ORIGIN @ IN NS @ IN NS

This zone file defines for the domain the authoritative nameservers and (usually the server itself and its slaves). The zone includes also the configuration for the name www, as an example.

Then, it sets for the sub-domain the authoritative nameservers and


When a client asks for, it initially contacts or, since they are the authoritative nameservers for the zone

The nameserver returns and as authoritative nameservers to resolve the sub-zone

So the client contacts one of these two nameservers, that will return the IP address for