WHOIS Servers
Contents
What are WHOIS Servers?
WHOIS Servers are used to provide availability results for a domain when performing a domain lookup. In some cases, these servers can also return the Contact Details for a domain. WHMCS supports a large number of TLDs, however it is possible that you wish to use one not supported by default. You can add or change any TLD lookup you like by overriding the default file.
WHOIS Servers File Location
resources/domains/dist.whois.json //This is the default file included in WHMCS
resources/domains/whois.json //This is the override file that can be created
Overriding WHOIS Servers
The default WHOIS Servers file should not be edited. Instead, use an override file in the same directory named whois.json - the override file does not exist by default and may need to be created. WHMCS will load the default file first, then the override file to ensure any customisations made are used when performing a lookup.
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.
Sample whois.json Override File
[
{
"extensions": ".myextension,.myextension.com",
"server": "whois.myextension.net",
"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 items.
- extensions - This is 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.
- server - This is the server that will be connected to. If the server starts with http://, then a HTTP lookup will be completed. A port for the server can be provided using :port on this field.
- available - This is the string that WHMCS will search for when doing a lookup. Not finding this string will mean that the domain shows as unavailable or already registered.
The sample file shows that while it is possible to add custom extensions (in this case .myextension and .myextension.com), it is also possible to override the default WHOIS Server for an extension.