Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 "" {
  type master;
  file "correctdomain.zonefile";

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

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

share|improve this question
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 '12 at 11:58
Does it work when you try it? – larsks Aug 22 '12 at 13:33
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. – Marcus Downing Aug 22 '12 at 15:13
up vote 5 down vote accepted

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 ; <-- That's fine too.
@                        IN    A  ; <-- use @ for the base domain
                                                 ;     so it works everywhere

but   IN    A  ; <-- This will make BIND cry.
                                                 ; (because it's a bad name in
                                                 ;'s zone file)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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