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?
It’s in the SRV-record _nicname._tcp.tld –
For example;
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