I have a site with a bunch of synonym domains. The site itself accepts all the different domains, and redirects to the correct domain name.

Is there any reason not to configure zones.conf like so:

zone "correctdomain.com" {
  type master;
  file "correctdomain.zonefile";

zone "synonymdomain.com" {
  type master;
  file "correctdomain.zonefile";

There's nothing in the zone file itself that's tied to the domain name.

  • 1
    I don't really see a reason why this should not be allowed. If the zonefile containt the correct information there should be no issue I guess.
    – Goez
    Aug 22, 2012 at 11:58
  • Does it work when you try it?
    – larsks
    Aug 22, 2012 at 13:33
  • 1
    It appears to work, but that doesn't mean there isn't some horrid surprise lurking in the wings waiting to pounce after the site goes live. Aug 22, 2012 at 15:13

1 Answer 1


Absolutely fine -- with one critically important caveat: You MUST use short names for your records.

foo                      IN    A             ; <-- This is fine.  
bar                      IN    CNAME  foo                   ; <-- This is fine.
baz                      IN    CNAME  foo.correctdomain.com ; <-- That's fine too.
@                        IN    A  ; <-- use @ for the base domain
                                                 ;     so it works everywhere


quux.correctdomain.com.   IN    A  ; <-- This will make BIND cry.
                                                 ; (because it's a bad name in
                                                 ;  synonymdomain.com's zone file)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .