Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I currently have a working BIND nameserver Running on my dedicated ubuntu server box. I have one zone set up.. example.com with its own nameservers.

If I want to add a new domain to point to the server, can I somehow add it to the existing zone? Or do I have to create a new zone and setcoms nameservers to example.com?

share|improve this question
    
Depending on what you're doing, see also serverfault.com/questions/443684/… and serverfault.com/questions/444060/… –  derobert Nov 1 '12 at 21:38
add comment

1 Answer

Yes, you have to. But you can point to the same zone-file, if you want to.

Let's assume you have the following named.conf at the moment:

zone "example.com" in {
        type master;
        file "example.com.zone";
        allow-query { any; };
};

and the following example.com.zone:

$TTL 1D
@ IN SOA ns.example.com. hostmaster@example.com. ( 
        2012061001 ; serial 
        8H ; refresh 
        2H ; retry 
        1W ; expiry 
        11h) ; minimum 

        IN      NS      ns1.example.com. 
        IN      NS      ns2.example.com.

        IN      A       127.0.0.1
*       IN      A       127.0.0.1
ns1     IN      A       127.0.1.1
ns2     IN      A       127.0.2.1

You can safely add

zone "example.org" in {
        type master;
        file "example.com.zone";
        allow-query { any; };
};

to your named.conf and your bind will serve example.org with the settings of example.com.

share|improve this answer
add comment

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.