6

How can I get from the console information about domain expiration date for european domains, like .eu, .de, .sk?

For .com domains I just use whois example.com, but for european domains I get just the brief info, without the date (eg. NOT DISCLOSED! for .eu domains)

As an alternative solution I've found paid web service www.whoisxmlapi.com, but it's limited too (and I'm looking for a solution for non commercial projects).

  • when doing a whois on a .eu domain it refers me to whois.eurid.eu isn't it what you need? – Srgrn Mar 28 '16 at 9:20
  • 2
    whois.eurid.eu provides the information I need, but only via web service, with captchas etc. I'm looking for a way go get the data from the console, similar to the .com domains – takeshin Mar 28 '16 at 9:35
  • oh. it seems that you are correct. they clearly state in their terms that they do not share registrant information on textual whois, well beside getting a username and password as visually imparied person it seems there is no easy way. – Srgrn Mar 28 '16 at 10:18
  • The ultimate solution will be RDAP but it has only really been implemented for IP network lookups so far. The only ccTLD which has implemented it for domain names so far is cz. – Michael Hampton Oct 29 '16 at 6:28
0

Most ccTLD (.de and .eu too) don't have expiration date shown when you run whois, while .sk is one of those that do. Only solution until this policy changes is to use api to get full whois from web interface on that national registry. Here you can find list with available whois info for most ccTLD: http://linuxmafia.com/pub/linux/network/domain-check-testdata

As you can see, most of ccTLD whois servers don't return expiration dates.

0

Here's an online whois that worked (displayed expiracy date) for a .eu domain name : https://whois.eurid.eu/en/?domain=demosphere.eu

0

You should be able to get whois for almost any domain, actually there are regulations to make sure that's the case. But obviously it's not the case always. To do whois properly from command line, you have to first:

1) connect to whois using the -h switch with one of the servers on this list:

http://www.nirsoft.net/whois_servers_list.html

NOTE: each ending/tld has one "main registrar"

2) What you get in return, will include a field that gives you the whois server address of the registrar where the domain is actually registered.

NOTE: You can get the full registration information only from the registrar where the domain is actually registered.

If you run:

$ whois google.com 

It will try to do this for you in the background (as far as I understand), but depending on the system and whois version, it's often not doing it well and might also be prone to being rate-limited.

Below a quick code example for doing whois "properly". I've tested it with a large number of sites, and it avoids the usual rate-limit issues and returns a much higher 'complete result' rate than any other method I had tried.

TLD=$(echo $DOMAIN | cut -d. -f2-)

WHOIS=$(grep -w ^$TLD whois_server.txt | cut -d ' ' -f2)

timeout 2 whois -h $WHOIS "domain "$DOMAIN"" | grep "   " | grep -v "Status:" | tr ':' '=' | tr -d ' ' | tr '[a-z]' '[A-Z]' > whois.bash

REGIST=$(cat whois.bash | grep WHOISSERVER | cut -d= -f2)

timeout 2 whois -h $REGIST $DOMAIN | grep : | grep -w '^Admin City\|^Admin Country\|^Registrant Organization\|^Registrant Name' | tr [a-z] [A-Z] | sed 's/\ /_/' | sed 's/:/=("/' | tr -d ' ' | sed 's/$/")/' | tr '/' '_' >> whois.bash;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.