How can I look up new TLDs, such as .email, .guru, etc., using the whois command in linux?
Running whois on a new TLD only gives the response:
No whois server is known for this kind of object.
How can I look up new TLDs, such as .email, .guru, etc., using the whois command in linux?
Running whois on a new TLD only gives the response:
No whois server is known for this kind of object.
You can manually configure the whois servers for the new TLDs.
Just create the file /etc/whois.conf and add the following content and you will be able to look up the new TLDs:
whois.conf (Github Mirror: whois.conf)
The whois.conf is using regular expressions.
You can easily get the right whois server directly from IANA without editing additional files or tables.
Example for ".de" TLD
Linux, OSX (and compatible):
whois -h whois.iana.org .de |
egrep -e '^whois:' |
sed -e 's/[[:space:]][[:space:]]*/ /g' |
cut -d " " -f 2
Have fun
Most whois clients hard-code the TLD whos servers, instead of actively retrieving the whois server from IANA when performing for a TLD that is not already known to the client.
I have built my own online whois lookup tool you can use http://gwhois.org/ that supports all TLDs and IP addresses since all lookups start at IANA and then traverse to the registry and registrar as needed.
I have also spent a lot of time building an intelligent whois parser that displays the whois data in a user-friendly manner.
Example screenshots:


This appears to work for most new tlds:
Server hostname is in the form: whois.nic.newtldname
e.g.:
whois -h whois.nic.host example.host
"This name is reserved by the Registry in accordance with ICANN Policy." etc etc etc
Also, browsing to http://nic.newtldname typically takes you to the Registry / Launch page.
If you are using the standard linux client, the definitions have not been updated yet to include the new TLDS.
You have two possible solutions:
For updating your /etc/whois.conf you can use a script like
/*
* Usage : node generateWhoisConf.js > /etc/whois.conf
*/
var json = require('comment-json');
var request = require('request');
request('https://github.com/weppos/whois/raw/master/data/tld.json', function(error, response, body){
var obj = json.parse(body);
Object.keys(obj).forEach(function(key){
if(obj[key].host){
console.log(key.replace(/\./g,'\\.') + '$ ' + obj[key].host);
}
});
});
https://gist.github.com/HugoPoi/4694a99f5a9d9b2c558557bbdd113f54
This other github repository provide good data about whois server https://github.com/whois-server-list/whois-server-list
On OS X, the whois tool doesn't seem to be built with the /etc/whois.conf support (Just like slackware?). The easy way to fix this seems to be to instal the "duped" whois from homebrew. You can do that with
brew tap homebrew/dupes
brew update
brew install whois
brew untap homebrew/dupes
That way, it will use a updated list of whois servers (But I only tested with .so and .ninja domains).
One way is to use TLD.whois-servers.net as the whois server, e.g:
whois -h mobi.whois-servers.net npr.mobi
The whois-server.net domain (run by CenterGate LLC, no affiliation) contains a hopefully up-to-date list of DNS CNAME redirects to official TLD whois servers, e.g:
dig mobi.whois-servers.net
...
;; ANSWER SECTION:
mobi.whois-servers.net. 146 IN CNAME whois.dotmobiregistry.net.
My solution was not very sophisticated. I could not look up a certain TLD under Debian Wheezy or Squeeze, or in OS X El Capitan or Snow Leopard. I found out that I could look up the TLD in Debian Jessie though. On the Debian machines I just grabbed the source for whois for Jessie and built it; works fine now. For OS X, I grabbed a newer version of whois through MacPorts.
I had the same problematic server response to one of my requests.
In this case, using the -a switch was simple and worked great:
whois -a [your_request_here]
From man:
[This flag is] understood by whois.ripe.net and some other RIPE-like servers:
-a
Also search all the mirrored databases.
Or, you can just use a better tool. E.g. GNU jwhois which is flexibly search for appropriate whois server first, then do the actual lookup using that server.
jwhois an improved Whois client capable of selecting Whois server to query based on a flexible configuration file using either regular expressions or CIDR blocks
GNU path : https://ftp.gnu.org/gnu/jwhois/
Github one: https://github.com/jonasob/jwhois