Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

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

1 Answer 1

up vote 4 down vote accepted

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

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

but

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

Your Answer

 
discard

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.