1

To PROGRAMMATICALLY verify if a domain exists I do the following:

  1. DNS Query it and see if it resolves. If it does, it's obviously registered. So no need for step 2. If it doesn't, it might STILL be registered. So a whois check is required.
  2. Backtrack from whois.iana.org and see if the designated whois server knows the domain or not.

Well, whois is not really meant for bulk checking. Not to mention that the RFC has only 4 pages and there's no clear specifications as to the format or even the encoding of the data. So you pretty much have to train the parser for each specific answer format (server).

Is there a way to circumvent the whois query and check (as close to the metal as possible) if the domain is registered in another (publicly available) standardized (preferably free or affordable) way? And not by downloading the TLD zone file or using third-party APIs (as they have a bad habit of snatching domains that you check before you get to register them). :)

I know registrars have their own protocol but I'm not sure if it's open to public use.

CodeAngry
  • 12,760
  • 3
  • 50
  • 57
  • Can I offer you my [Whois API](http://whois-api.domaininformation.de/)? I've no interest in snatching away any domain names. – Markus Malkusch Mar 11 '16 at 12:20
  • Do not use the DNS to check if a domain exists (as in: is registered). You can have a domain name not resolving at all (having no nameservers or having some but being in hold status hence removed from registry zonefile) and this is perfectly legit. The only public generic tool is unfortunately `whois`, but some TLDs offer other public interfaces. Registrars of course have more powerful interfaces, so you can check with one you trust and see if it gives you access to an API for your needs. – Patrick Mevzek Jan 02 '18 at 20:19

1 Answers1

4

There isn't really any good way to do this accurately without looking at zone files or checking directly with the registry, unfortunately.

Registrars typically use a protocol like EPP to talk to a registry, check name availability and place orders. It's unlikely that anyone other than an accredited registrar would be permitted to use this protocol, but it may be worth checking with the registry that manages the TLDs you are interested in, e.g. Verisign.

I'd (personally) be wary of relying too much on DNS queries or WHOIS lookups to ascertain whether a particular domain exists, as both can produce inaccurate results from time to time. For example, certain TLDs have name servers configured for any unregistered domain name (they often direct you to the registry's website). The Vietnamese registry is one example of this. WHOIS lookups can fail for any number of reasons, so lack of a record is not concrete evidence of the domain's availability.

Alex Riley
  • 169,130
  • 45
  • 262
  • 238
  • *certain TLDs have name servers configured for any unregistered domain nam* - good to know. Haven't come across one of those. But it's far out of my interest zone. --- I'll select this answer as it's the correct one, not the one I hoped for. :) – CodeAngry Dec 13 '14 at 15:16
  • 1
    @Alex per contracts, only accredited registrars can access registries systems, and specifically through an EPP interface, or equivalent. – Patrick Mevzek Jan 02 '18 at 20:20
  • @CodeAngry unfortunately it can happen anywhere anytime. During few days in the past VeriSign replied for all domain names query on the DNS, including not existing ones, for various good or bad reasons (depending on who you asks). It is only after a big uproar that it stopped doing so. See https://en.wikipedia.org/wiki/Site_Finder for details. – Patrick Mevzek Jan 02 '18 at 20:22