WHOIS Servers
WHOIS servers 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, and you can add other WHOIS servers manually. If you want your customers to be able to check the availability of new domains, WHMCS must use the appropriate WHOIS servers.
WHOIS Server Definitions
WHMCS stores data for WHOIS servers in whois.json
files. WHMCS ships a default list of WHOIS server definitions, and you can create override files to customize or add to the list.
Definition Data
Definition files contain the following data:
Data | Description |
---|---|
extensions | A comma-separated list of extensions to use this WHOIS server for. |
uri | The server’s URI. A WHOIS-based server begins with socket:// while a web-based request begins with http:// or https:// . You can add a port using :port on this field. |
available | 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. |
Default WHOIS Servers
You can find the default shipped WHOIS server definitions in the /resources/domains/dist.whois.json
file.
Add a WHOIS Server for Domain Availability Checks
.aarp
.To add a new WHOIS server to WHMCS:
- Find the WHOIS server for the desired TLD. In most cases, you can find this in the IANA root database.
- Run the following command on your server:
telnet whois.nic.aarp whois
- Enter any available domain using that TLD (for example,
example-domain-check.aarp
). The output will show the Whois server’s match string (in this example,No match for
):No match for "EXAMPLE-DOMAIN-CHECK.AARP".
- Create a
/resources/domains/whois.json
file on your server. - Add the TLD extension, the WHOIS server address, and the match string to the file using the following format:
[ { "extensions": ".aarp", "uri": "socket://whois.nic.aarp", "available": "No match for" } ]
- Save the file.
Last modified: October 30, 2024