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.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityHow 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
whois
utility, I'm not sure (maybe to reduce load?). Anyway, props and thank you.
– apinstein
Jul 11 '16 at 4:00
whois -h $(whois -h whois.iana.org .TLD | grep '^whois:' | sed 's/whois:\s*//') example.TLD
. Interestingly though, it's sufficient to use whois.nic.TLD
as a database host for most (or maybe all?) TLD's, as pointed out by @Andrew.
– Peterino
Aug 11 '16 at 9:30
.tube
the responsible server is not published. Probably because the IANA server is responsible as whois -h whois.iana.org nic.tube
works.
– thde
Jan 29 '19 at 14:41
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:
gwhois
package requires an additional 25 packages to be installed from official repository. Not that I would miss the ~4.4MB of storage, are all these really necessary for the package to run correctly?
– Paul
May 25 '14 at 21:32
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.
whois -h $(whois -h whois.iana.org .TLD | grep '^whois:' | sed 's/whois:\s*//') example.TLD
– Peterino
Aug 11 '16 at 9:17
whois.nic.$ext
and $ext.whois-servers.net
-- I'm looking for others to add to my list.
– chovy
Feb 25 '17 at 5:02
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:
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).
whois
CLI is brew install homebrew/dupes/whois
– user124460
Jun 5 '15 at 23:07
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
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.
whois -c mobi npr.mobi
. Sadly it doesn't work for all domains at the time of writing e.g. whois -c tube nic.tube
– thde
Jan 29 '19 at 14:34
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