I want to setup a new TLD (foo.) for my the private network so that I can host some child domains which will be accessible from within the network. For this purpose I have setup a DNS server ( for foo.. For this I created a zone file foo-zonedb.rr with the following records:

$ORIGIN foo.
$TTL  100
@       IN  SOA ns1.tld.foo. hostmaster.tld.foo (
@    300 IN NS ns1.tld.foo.
@    300 IN  A
ns1.tld.foo.    300 IN A

And also I have added the following entries in /etc/named.conf

zone "foo." {
             type master;
             file "foo-zonedb.rr";
             notify explicit;

Now suppose every machine on the network uses as their DNS server. What configuration should I have to do on so that it won't redirect DNS request for foo. domain to root DNS servers?

  • 1
    see serverfault.com/questions/17255/… for a discussion about why using a made up TLD is possibly a bad idea. Aug 6 '12 at 14:58
  • @TimKennedy: but i am talking about the configuration details..the discussion on the link which u provided is totally offtopic Aug 6 '12 at 15:39
  • ok. just wanted to make sure you're aware of the gotcha's involved in hosting a private TLD connected to the internet. Aug 6 '12 at 16:32

type master; does what you want. if is the authoritative server, requests will not go to the root servers. Non-existent entries will result in NXDOMAIN status.

If you want to stop all queries from forwarding to the root-servers, then you should turn recursion off. see: http://www.zytrax.com/books/dns/ch6/#authoritative


You could have clients configured to use as their primary DNS server.

Use the forwarding option in bind to on your DNS server at

options {
         [Your other options here]
         forwarders {;};

The first Authoritive response will be returned (wins). So your clients look up


Your DNS server will provide an authoritive response (either a valid record or NXDOMAIN). If your client searches for www.google.com - your DNS server cannot provide a response and as a result will forward the request to

I use custom TLD's for everything on my internal networks. With the above configuration, it works without any issues and still allows public DNS resolution via the forwarding option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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