Verify that a name server is registered at a TLD registry

Solution 1:

You can us dig and choose a public DNS server

dig 8.8.8.8 NS example.com

This will get you the names of the name servers then you can just look them up e.g.

dig +short ns1.example.tld 
123.456.789.001

or if you're using windows you can use nslookup

nslookup
> server 8.8.8.8
> set type=ns
> example.com 

Then similar to above

nslookup ns1.example.tld

will provide you with the ip address


If you want to query the tld directly then

dig ns tld

will provide a list of the TLDs name servers, you can then query them directly for the ns records for example.tld

dig @ns666.tld ns example.tld

Solution 2:

Normally you can use Whois to query nameservers:

$ whois -h whois.verisign-grs.com "nameserver =ns3.serverfault.com"

Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

   Server Name: NS3.SERVERFAULT.COM
   IP Address: 69.59.196.217
   Registrar: NAME.COM LLC
   Whois Server: whois.name.com
   Referral URL: http://www.name.com

>>> Last update of whois database: Fri, 18 Jan 2013 08:57:23 UTC <<<

The implementation of this feature is up to the TLD. .GOV, for example, does not return nameserver queries:

$ whois -h whois.nic.gov "nameserver =a.gov-servers.net" 
% DOTGOV WHOIS Server ready
No match for nameserver "A.GOV-SERVERS.NET".

>>> Last update of whois database: 2013-01-18T08:59:27Z <<<

There is not really a reliable way (i.e. a method available on all TLDs) to check if a host has been registered at a registry via public DNS or Whois services. You can't query glue records directly, and you only see them if you query a domain using the nameservers you're looking for. Since you're interested in nameservers not associated with any domain, this is not an option.

The whois approach is your best bet, but cannot be relied upon. A registry might have a nameserver registered but not bother putting it in Whois if there are no associated domains. The only 100% reliable ways to verify a nameserver's existence in the registry are to query the registry via an EPP CHECK command. Since those are only available to registrars, it doesn't help you much.

Let's say there are no domains using these name servers for DNS yet. How can verify outside of my R account, that the name servers have been registered successfully at the .TLD registry?

Of course, if you have no domains associated with a nameserver, does it really matter? The only guaranteed way you can check is to register a domain in the TLD using your nameserver, query the domain, and check the glue you get back from `dig @tldnameservers yourdomain ns.

Solution 3:

Use nslookup or dig to query a gTLD server for your name servers. You could also use the following web site to trace the DNS delegation for your domain:

http://www.simpledns.com/lookup-dg.aspx