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

So I have been trying to setup BIND / named as a primary / secondary name server for a domain name I purchased a while back because I switched my hosting plan from shared to VPS recently. I think I have everything setup properly (for the most part) but when I go to ping the domain name I have registered, the command prompt just says unknown host. I made sure I registered the name servers with the domain name registrar, and I can ping the name servers. So I know that part is working but for whatever reason I can not ping my domain name.

The domain name I am referring to is

The named.conf looks like the following,

The file looks like the following,

and the reverse,

share|improve this question

closed as off-topic by Falcon Momot, Wesley, Ward, dawud, Dave M Sep 7 '13 at 19:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – Falcon Momot, Wesley, Ward, dawud, Dave M
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 4 down vote accepted

Let's start with some sanity checks.

From your whois record:


Looks good.

Do the TLD servers for com. have this information?

$ host -v -t ns
Trying ""
Using domain server:
Address: 2001:503:a83e::2:30#53

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15725
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 2

;               IN      NS

;; AUTHORITY SECTION:        172800  IN      NS        172800  IN      NS

;; ADDITIONAL SECTION:    172800  IN      A    172800  IN      A

Received 101 bytes from 2001:503:a83e::2:30#53 in 119 ms

Still looking good.

Do your nameservers work?

$ host -v -t ns
Trying ""
Received 33 bytes from in 88 ms
Trying ""
Using domain server:

Host not found: 5(REFUSED)
Received 33 bytes from in 89 ms

No, it refused our query!

$ host -v -t ns
Trying ""
;; connection timed out; trying next origin
Trying ""
;; connection timed out; no servers could be reached

No, it's down!

OK, let's start with your nameserver that's up. In the options in named.conf you have, among other things:

allow-query { localhost; };
recursion yes;

So, queries are only allowed from the local host! All others get refused.

For a proper authoritative name server, you should allow access from anywhere and turn off recursion.

allow-query { any; };
recursion no;

Once you get that straight, you'll find that your zone has no A (or AAAA) records, thus you can't look up the address for, for instance, Be sure to add the appropriate A and AAAA records.

Finally, your secondary DNS server doesn't exist, and is also on the same subnet if it did exist. This effectively breaks the redundancy that having two or more nameservers is supposed to provide. Consider locating your other DNS server somewhere else, for instance on another server in another country, or with a third party provider.

share|improve this answer
Mike, thank you so much for the thorough reply. I will definitely run through the ropes in the AM, thanks again for the reply, as I will make the necessary changes. – Chris Sep 7 '13 at 6:22
A quick way to troubleshoot DNS failures is to run dig +trace A more thorough approach would be to use one of many web-based DNS analyzer tools. – 200_success Sep 7 '13 at 8:24

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