Difference between revisions of "WHOIS Servers"

From WHMCS Documentation

Line 11: Line 11:
 
==Customising WHOIS Servers==
 
==Customising WHOIS Servers==
  
The WHOIS Server definitions shipped with WHMCS by default can be found in ''resources/domains/dist.whois.json''. This file should '''not''' be edited.
+
The WHOIS Server definitions shipped with WHMCS by default can be found in ''/resources/domains/dist.whois.json''. This file should '''not''' be edited.
  
 
<div class="docs-alert-info"><i class="fa fa-question-circle"></i> Prior to WHMCS 7.0, this file was located at ''/includes/whoisservers.php'' in a different format</div>
 
<div class="docs-alert-info"><i class="fa fa-question-circle"></i> Prior to WHMCS 7.0, this file was located at ''/includes/whoisservers.php'' in a different format</div>
Line 42: Line 42:
 
* '''extensions''' - A comma separated list of extensions that this WHOIS server will be used for. In the above example there are two whois servers defined, but three extensions for which lookups are defined.
 
* '''extensions''' - A comma separated list of extensions that this WHOIS server will be used for. In the above example there are two whois servers defined, but three extensions for which lookups are defined.
 
* '''server''' - This is the server that will be connected to. A port for the server can be provided using :port on this field.
 
* '''server''' - This is the server that will be connected to. A port for the server can be provided using :port on this field.
* '''type''' - '''whois''' or '''web'''. Use web for an HTTP based lookup. Defaults to whois if none provided.
+
* '''type''' - ''whois'' or ''web''. Use ''web'' for an HTTP based lookup. Defaults to ''whois'' if none provided.
 
* '''available''' - This is the [[Glossary#String|string]] that WHMCS will match against to determine an available domain. This string must only appear in the output when the domain is available.
 
* '''available''' - This is the [[Glossary#String|string]] that WHMCS will match against to determine an available domain. This string must only appear in the output when the domain is available.
  

Revision as of 15:43, 13 June 2016

This documentation page applies to a future as yet unpublished version of WHMCS.

What are WHOIS Servers?

WHOIS Servers are used to determine the availability of domains.

In most cases, WHOIS servers will also return the WHOIS Contact Information for a domain.

WHMCS supports a large number of TLDs by default. However, if you wish to sell a domain extension not offered by default, you will need to add the WHOIS Server for it.

Customising WHOIS Servers

The WHOIS Server definitions shipped with WHMCS by default can be found in /resources/domains/dist.whois.json. This file should not be edited.

Prior to WHMCS 7.0, this file was located at /includes/whoisservers.php in a different format

To add or edit whois server definitions, begin by creating a custom whois.json file located at /resources/domains/whois.json

Inside it, define the whois servers you wish to use.

Below is a sample custom whois.json file defining the whois servers for .myextension and .myextension.com, and overriding the default whois server for .org

Sample whois.json Override File

[
    {
        "extensions": ".myextension,.myextension.com",
        "server": "whois.myextension.net",
        "type": "whois",
        "available": "No match for"
    },
    {
        "extensions": ".org",
        "server": "whois.my-org-whois.net:96",
        "available": "NOT FOUND"
    },
]

A WHOIS Server entry is made up of three parts.

  • extensions - A comma separated list of extensions that this WHOIS server will be used for. In the above example there are two whois servers defined, but three extensions for which lookups are defined.
  • server - This is the server that will be connected to. A port for the server can be provided using :port on this field.
  • type - whois or web. Use web for an HTTP based lookup. Defaults to whois if none provided.
  • available - This is the string that WHMCS will match against to determine an available domain. This string must only appear in the output when the domain is available.

Where can I find other WHOIS Servers?

An extensive list of whois servers can be found at IANA, if it not listed you will need to contact the registry to find out the appropriate information.