Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have installed bind9 on a Debian VPS, and use it as nameserver for one of my domains. It works well. dig reports correct entries.

I now wish to use this nameserver for four more domains, and am a bit confused about certain configuration parameters.

The primary domain I used is, for which I have set up the following in master zone file

cat /etc/bind/named.conf.local
zone "" {
     type master;
     file "/var/lib/bind/";
     allow-update { key rndc-key; };
zone "" {
     type master;
     file "/etc/bind/zones/";

I have added this:

zone "" {
     type master;
     file "/var/lib/bind/";
     allow-update { key rndc-key; };

for my second domain, and the following in /var/lib/bind/       IN      SOA (
                   2007010401           ; Serial
                         3600           ; Refresh [1h]
                          600           ; Retry   [10m]
                        86400           ; Expire  [1d]
                          600 )         ; Negative Cache TTL [1h]
;     IN      NS      IN      NS      IN      MX      10     IN      A
www.            IN      A
ns1.            IN      A
ns2.            IN      A        3600    IN      CNAME
*   3600    IN      CNAME

My /etc/resolv.conf currently looks like this:

#cat /etc/resolv.conf

My questions are:

  1. What should my resolv.conf be, to allow me to use this server as nameserver for both domains?
  2. Am I correct in assuming that I shouldnt add a reverse DNS (PTR) for the second domain, since I already have one for the first domain?
  3. Other than editing /etc/bind/named.conf.local and adding /var/lib/bind/, are there any additional steps to do?
share|improve this question

1 Answer 1

up vote 1 down vote accepted
  1. resolv.conf has nothing to do with using the nameserver for a domain. (resolv.conf contains a list of caching nameservers for the server/host, and not a list of authoritative nameservers for the domains hosted on the server .
  2. For the domains to work, you don't need reverse DNS. Also probably you can't set that (ie rDNS's won't be visible on internet). This is because in most of the cases is set by your server/IP provider . 3.This doesn't look ok: IN NS IN NS The nameservers shouldn't be and ? As i see is not registered. Well, just checked, and the nameservers are and . So i would change the NS records to that. IN NS IN NS Also change the SOA record to IN SOA ( etc
share|improve this answer
You're right Sandor. I'd posted the uncorrected file here. It was fixed. Your points are valid too. Thank you. Once a ran a named-checkzone, the errors were obvious. – Droidzone May 5 '13 at 17:38

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.