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

I'm trying to check a domain's availability using the "host" command and looking for NXDOMAIN response. I've come across an odd domain though:

host -W 1

This returns NXDOMAIN, yet the whois record shows its nameservers set to:

Is there any particular reason for this response? Is there a better way to check for the existence of a domain's nameservers?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

My WHOIS results show these two name servers:


The name servers 'exist' in the WHOIS results but no listed name server responds with records for this domain. Check the output of both host and dig using the two servers listed in the WHOIS as well as the other on you have listed in your question:

Using host:

dave@dev:/var$ host
;; connection timed out; no servers could be reached

dave@dev:/var$ host
host: couldn't get address for '': not found

dave@dev:/var$ host
Using domain server:

Host not found: 3(NXDOMAIN)

Using dig:

dave@dev:/var$ dig

; <<>> DiG 9.5.1-P2 <<>>
; (1 server found)
;; global options:  printcmd
;; connection timed out; no servers could be reached

dave@dev:/var$ dig
dig: couldn't get address for '': not found

dave@dev:/var$ dig

; <<>> DiG 9.5.1-P2 <<>>
; (3 servers found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 8959
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;            IN      A

;; Query time: 62 msec
;; WHEN: Sat Jul 25 10:19:16 2009
;; MSG SIZE  rcvd: 36

The connection times-out to the first name server, the second name server's host name doesn't resolve, and the third name server responds indicating that it doesn't have a zone for (it has no records for that domain).

share|improve this answer
Thanks for clarifying that, Dave. Do you have any suggestions for determining whether or not a domain is available aside from WHOIS? – Kevin Jul 25 '09 at 11:38
If you're looking to check for domain availability, WHOIS is your best bet (though not perfect because there can be some delay). – Dave Forgac Jul 26 '09 at 13:26

It is a funny case of lame delegation. Lame delegation is when a domain is delegated to name servers which are not aware of it (by misconfiguration or any other reason). Typically, a server which does not have the delegation replies SERVFAIL (Server Failure) or NOERROR with a redirect to the root but nsf.algx.NET replies NXDOMAIN (No Such Domain) with the AA (Authoritative Answer) flag, something it clearly has non business to do.

So, here, you've found an interesting example of brokenness.

Otherwise, checking a domain availability by using the DNS is a very bad idea because, in many registries, a domain can be registered and not published, at the will of the domain owner.

share|improve this answer

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.