0

How do I programatically determine the WHOIS server for a given TLD?

For name servers, I just query a.root-servers.net

Is there an equivalent procedure for WHOIS?

I know "host -t ns xxx." yields the DNS for a TLD: can the WHOIS server be derived from that result?

  • 1
    I think you can do this by following a chain of referrals from something like whois.iana.org – Flexo Jun 01 '11 at 15:25

1 Answers1

2

It's in the SRV-record _nicname._tcp.tld -

For example;

# dig +short SRV _nicname._tcp.no
0 0 43 whois.norid.no.

More information can be found in the Wikipedia-article of whois.

That works for some tld's at least - but not .com.

tld.whois-servers.net is a commonly used alias that should point to a valid whois-server. For example com.whois-servers.net

Kvisle
  • 698
  • 1
  • 5
  • 12
  • Thanks! It looks like "whois -h whois.iana.org xxx" does the trick perfectly, as does "host xxx.whois-servers.net" (as you note above). GNU prefers the latter, but the former seems more official to me. In either case, I got my answer! Updating jwhois also helped a lot! –  Jun 01 '11 at 23:42