I have a situation where I need to replace the nameservers for both a.b.c and b.c. I'd rather not have to dedicate two machines to this.

I've been reading about multi-homing but the examples all seem to be for *.b.c rather than a domain and a subdomain of the same.

Is this scenario possible with a single machine?

  • This works, yeah. The only thing you can't do is what is known as a "horizontal delegation", which is an attempt to re-delegate something that has already been delegated to you. (if sub1.example.com is delegated to you, you can't delegate sub1.example.com to someone else)
    – Andrew B
    Jun 19, 2014 at 3:04

1 Answer 1


Yes, it's perfectly supported without any problem.

You can even host completely distinct domains in the same machine.

For example, using BIND9 as the DNS server you should put something like this in named.conf:

zone "example.com" {
        type master;
        file "/usr/local/etc/namedb/static/example.com";
        notify yes;
        allow-transfer { nameservers; }

zone "subzone.example.com" {
        type master;
        file "/usr/local/etc/namedb/static/subzone.example.com";
        notify yes;
        allow-transfer { nameservers; }

Just fill the zone files with your zone data. In the main zone file you can specify the subzones accordly too, with even MX records for mailing, take a look at this example for the file example.com:

; Nameservers records
ns.example.com.         IN      A
ns1.example.com.        IN      A
ns2.example.com.        IN      A

; Delegated internal zones
local.example.com.      IN      NS      ns.example.com.
mgmt.example.com.       IN      NS      ns.example.com.

; Delegated external zones
subzone.example.com.    IN      NS      ns.example.com.
whatever.example.com.   IN      NS      ns.example.com.

; Delegated external zone with its own nameservers (and glue records)
fnord.example.com.      IN      NS      ns1.fnord.example.com.
fnord.example.com.      IN      NS      ns2.fnord.example.com.
ns1.fnord.example.com.  IN      A
ns2.fnord.example.com.  IN      A

; Mailing zones
lists.example.com.      IN      A
                        IN      MX      0 lists.example.com.
                        IN      TXT     "v=spf1 mx ~all"
                        IN      SPF     "v=spf1 mx ~all"

Hope this clarify everything.

  • 6
    I snuck an example of a subzone delegation with its own nameservers (and glue records in there). It's better for people to get exposed to that sooner than later.
    – Andrew B
    Jun 19, 2014 at 2:57
  • Nice. So the 'parent domain' and the 'child domain' having the same IP address isn't an issue? Or is there still the need to have the same NIC responding to multiple IPs?
    – ethrbunny
    Jun 19, 2014 at 12:01
  • @ethrbunny Nope, no issue from a DNS standpoint.
    – Andrew B
    Jun 19, 2014 at 13:39
  • @ethrbunny are you a Windows Sysadmin? Because those questions are common in the Windows world. DC's have the requirement of different IP address, different machines and etc. Jun 19, 2014 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.