"host" command returning NXDOMAIN on a domain with nameservers
Solution 1
My WHOIS results show these two name servers:
RAPNET.DIAMONDS.COM
NS.DIGEX.NET
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 antiquejewelry.net rapnet.diamonds.com
;; connection timed out; no servers could be reached
dave@dev:/var$ host antiquejewelry.net ns.digex.net
host: couldn't get address for 'ns.digex.net': not found
dave@dev:/var$ host antiquejewelry.net nsf.algx.net
Using domain server:
Name: nsf.algx.net
Address: 207.88.20.150#53
Aliases:
Host antiquejewelry.net not found: 3(NXDOMAIN)
Using dig
:
dave@dev:/var$ dig @rapnet.diamonds.com antiquejewelry.net
; <<>> DiG 9.5.1-P2 <<>> @rapnet.diamonds.com antiquejewelry.net
; (1 server found)
;; global options: printcmd
;; connection timed out; no servers could be reached
dave@dev:/var$ dig @ns.digex.net antiquejewelry.net
dig: couldn't get address for 'ns.digex.net': not found
dave@dev:/var$ dig @nsf.algx.net antiquejewelry.net
; <<>> DiG 9.5.1-P2 <<>> @nsf.algx.net antiquejewelry.net
; (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
;; QUESTION SECTION:
;antiquejewelry.net. IN A
;; Query time: 62 msec
;; SERVER: 207.88.20.150#53(207.88.20.150)
;; 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 antiquejewelry.net (it has no records for that domain).
Solution 2
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.
Related videos on Youtube
Edvin Syse
Updated on September 17, 2022Comments
-
Edvin Syse over 1 year
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 antiquejewelry.net
This returns NXDOMAIN, yet the whois record shows its nameservers set to:
nsf.algx.net rapnet.diamonds.com
Is there any particular reason for this response? Is there a better way to check for the existence of a domain's nameservers?
-
Dave Forgac over 14 yearsIf you're looking to check for domain availability, WHOIS is your best bet (though not perfect because there can be some delay).