0

so I need to check a large amount of domains for availability in my program. I tried to use outside WhoIs servers, but they usually rate limit me. Does anyone know of a way to check if the domains are available on the host machine? I thought about doing a DNS lookup but someone could have registered the domain and just put a random DNS that resolves to nothing. Thanks!

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
user1947236
  • 673
  • 3
  • 12
  • 27

1 Answers1

0

I wrote a free whois library that may help. The library contains a large list of whois servers. So you could use this and spread the queries between each of the whois servers that work for that top level domain. If that doesn't work then you would have to fall back to doing a dns lookup on the address.

Community
  • 1
  • 1
Art Vandelay
  • 111
  • 3
  • Any links to the library? Advises on how to use it? – Olimpiu POP Apr 05 '13 at 14:01
  • Doh! That was a bit stupid of me. Here is the link https://code.google.com/p/jfreewhois/ – Art Vandelay Apr 05 '13 at 15:43
  • To get a list of servers for a hostname call ServerDefinitionFinder.getServerDefinitionsForHostName("stackoverflow.com"). Then pass one of those WhoisServerDefinitions into the call to Whois.getRawWhoisResults( "stackoverflow.com", whoisServerDefinition ). – Art Vandelay Apr 05 '13 at 15:49
  • There is only one relevant authoritative whois server per TLD so there is no way to share the load among more than one. Also using DNS to check if a domain exists or not is not a good idea since a domain can be registered but not delegated in the DNS. – Patrick Mevzek Jan 03 '18 at 21:55