I got a question in the SeoTool Community Forum on how to setup a .fr TLD in SeoTools.config.xml and decided to make a blog post about it.

This post assumes some knowledge in regular expressions. If you don’t know this already, regular expression are extremely powerful and really useful when working with SEO. Start by reading An SEO’s Guide to RegEx.

In SeoTools.config.xml you can add additional TLDs to support functions that use whois such as WhoIs, WhoIsDomainExpires, WhoIsDomainUpdated, WhoIsDomainCreated, DomainAge and IsDomainRegistered.

In SeoTools.config.xml, in the section <Tlds> add:

<Tld Name=”fr” WhoIsServer=”" WhoIsNotFoundRegex=”" WhoIsCreatedRegex=”" WhoIsUpdatedRegex=”" WhoIsExpiresRegex=”" WhoIsDelayMs=”1000″/>

First we figure out a good WhoIsServer for .fr. Googling “Whois server france” gives us “whois.nic.fr”. (Also <tld>.whois-servers.net usually works).

Now we do a whois search for a domain we know exist. Either find a whois service for your particular TLD or use a command line tools such as Whois in Sysinternals.

Then we figure out the regular expression for parsing out the part that we need. To do this, I copy the whois text into RegExr.

For WhoIsCreatedRegex we create the regular expression “(?:created:\s*(\d{2}/\d{2}/\d{4}))”. Do the same for WhoIsUpdatedRegex and WhoIsExpiresRegex.

We now finally need to figure out what happens when getting whois for a domain that doesn’t exist.

We see that if the domain isn’t registered, the text “no entries found” is present in the whois result.

Our final <Tld> is now:

<Tld Name=”fr” WhoIsServer=”whois.nic.fr” WhoIsNotFoundRegex=”no entries found” WhoIsCreatedRegex=”(?:created:\s*(\d{2}/\d{2}/\d{4}))” WhoIsUpdatedRegex=”(?:last-update:\s*(\d{2}/\d{2}/\d{4}))” WhoIsExpiresRegex=”(?:anniversary:\s*(\d{2}/\d{2}))” WhoIsDelayMs=”1000″/>

While working on this post I noticed that SeoTools wont propertly parse DD/MM/YYYY formatted dates. I will fix this in the next release of SeoTools (3.3). Until then only IsDomainRegistered will work properly with this configuration.

UPDATE:
This was fixed in 3.3. Final <Tld>for .fr is:

<Tld Name=”fr” WhoIsServer=”whois.nic.fr” WhoIsNotFoundRegex=”no entries found” WhoIsCreatedRegex=”(?:created:\s*(\d{2}/\d{2}/\d{4}))” WhoIsCreatedDateFormat=”dd/MM/yyyy” WhoIsUpdatedRegex=”(?:last-update:\s*(\d{2}/\d{2}/\d{4}))” WhoIsUpdatedDateFormat=”dd/MM/yyyy” WhoIsExpiresRegex=”(?:anniversary:\s*(\d{2}/\d{2}))” WhoIsExpiresDateFormat=”dd/MM” WhoIsDelayMs=”1000″/>

If you manage to make a TLD setting, please share with the community by posting in the comment section below.

 

 

3 Responses to How to setup Tlds in SeoTools.config.xml

  1. François says:

    Thanks a lot Niels for theses explciations. we wait for your new release ;) )

  2. François says:

    Hi Niels, thnaks for the release (3.3) but when we use your Final for .fr in excel we have each time a ? in the cell. I.E =WhoIsDomainCreated(A1) return a ?. Any idea to solve this point ?
    Thanks a lot

  3. nielsbosma says:

    @Francois: This =WhoIsDomainCreated(“paris.fr”) work fine for me. Are you sure you put in the config correctly. In the default config all tlds are commented out. Did you put the fr config in the comment?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>