Domain Registration
Registration of a new domain name is triggered automatically by WHMCS as soon as payment for an order is confirmed (or immediately if the order is validated manually). Here is a detailed breakdown of the process.
Client-side Registration Flow
- The client performs an availability search from your WHMCS cart
- They select the desired domain and choose the duration (1 year, 2 years, etc.)
- They fill in contact information (owner, administrative, technical, billing)
- If the TLD requires additional fields (e.g.
.fr→ AFNIC code), these fields appear automatically - They validate and pay the order
- WHMCS automatically triggers the API call to HostMyServers to register the domain
Technical Flow (module → API)
When WHMCS calls the module's RegisterDomain function:
- The module builds the API request with:
- The full domain name (e.g.
mydomain.fr) - The duration in years
- The nameservers (client's or configured default nameservers)
- WHOIS contacts (owner)
- TLD-specific additional fields (if applicable)
- The full domain name (e.g.
- The request is sent to the HostMyServers API via cURL (HTTPS)
- The API returns a success status or an error message
- On success, WHMCS updates the domain status to Active and records the expiry date
Managing Asynchronous Registrations
Some TLDs (particularly new extensions and certain ccTLDs) do not register the domain immediately. Registration can take from a few minutes to several hours. In this case:
- WHMCS marks the domain as Pending
- The synchronisation cron task regularly checks the status with HostMyServers
- As soon as registration is confirmed, the status automatically switches to Active
The client receives a confirmation email only when the domain switches to Active status.
Manual Registration from the Back Office
An administrator can register a domain manually (without going through the client cart):
- Clients → select the client
- Add New Product/Service → Domain
- Fill in the domain, duration, registrar (HostMyServers)
- Check Run Module Command Now to trigger registration immediately
- Click Add
WHOIS Contact Information
WHOIS information is filled in at the time of order and transmitted to HostMyServers at registration. If the client does not fill in their contact information in WHMCS, the module uses their account data (first name, last name, address, email, phone).
Registries require that WHOIS data be accurate and up to date. Incorrect data can result in the domain being suspended or deleted by the registry. Inform your clients of this obligation.
Common Registration Errors
| Error message | Probable cause | Solution |
|---|---|---|
Domain not available | The domain was registered between the search and the order | Ask the client to search for another name |
Invalid contact data | A required contact field is missing or invalid | Check and correct client data in WHMCS |
Insufficient funds | Insufficient HostMyServers balance | Top up the account from the HostMyServers client area |
Invalid TLD | The extension is not supported by HostMyServers | Check the available TLD catalogue in the client area |
Additional field required | Required additional field missing for this TLD | Verify that additional fields are properly filled in the order |