Syncing DNS zones with different names

Chris bind-users at
Wed Nov 16 07:57:13 UTC 2011

Thanks for the advice guys.

The DNAME record is something I'd never heard of, and is quite interesting. 
Unfortunately it does not quite fulfill my needs due to, as Chris pointed 
out, the inability to alias the records on the name itself.

I think Barry's suggestion of a common zone file on the master server with 
relative names will be the best solution, as long as I can ensure all the 
zones will be mastered on the same server!


-----Original Message----- 
From: Chris Thompson
Sent: Tuesday, November 15, 2011 11:38 PM
To: Bind Users Mailing List
Subject: Re: Syncing DNS zones with different names

On Nov 15 2011, Barry Margolin wrote:

>In article <mailman.98.1321341621.68562.bind-users at>,
> "Chris Balmain" <bind-users at> wrote:
>> Let's say I have two domain names, and, and I want to 
>> synchronise all records underneath them (one-way sync, that is). So if I 
>> create an A record pointing at, is also 
>> automatically created, with the same value. So it's almost like a 
>> master/slave relationship, but the slave zone has a different name to the 
>> master.
>> Let's assume the two zones will be hosted on the same set of nameservers, 
>> so even the SOA and NS records will be identical between them.
>> I've been googling, but haven't found anything. Does anyone know if this 
>> is natively possible with Bind 9, or will I have to hack a script 
>> together to do a transfer from the zone and parse the data to 
>> build an equivalent zone file for
>See the DNAME record. It's like a CNAME, but applies to the whole domain. 
>But you need to put the DNAME in the zone where the domain is delegated; so 
>in your case, you'd have to get the DNAME into the .COM zone.

No, you don't need to put the DNAME in the parent zone. A zone with
a DNAME at the apex works perfectly well, e.g. for

  @   SOA   my-master-server.example. ....
  @   NS    ... some nameservers ...
  @   DNAME

But note that neither this nor the alternative of putting the DNAME in
the parent zone will alias records with the name "" itself, only
names under that. If, for example, "" itself had MX or address
records, you would still need to reproduce them in the zone file.

For a real-life example, see the way that that the TLD "xn--kprw13d"
is made an alias of "xn--kpry57d", and note that the DNAME is in the
"xn--kprw13d" xone, not in the root zone.

>Another way to do it is to use the same zone file for both zones on the
>master server. Make sure that you use unqualified names everywhere in
>the zone file that you're not referencing outside the zone.

I think you mean "relative" (to the zone) or "non-absolute" rather than
"unqualified" there. Also, don't do this if you are using dynamic updates
on either zone, or the shared zone file will end up in a horrible mess.

Chris Thompson
Email: cet1 at
Please visit to 
unsubscribe from this list

bind-users mailing list
bind-users at 

More information about the bind-users mailing list