Domain Synchronisation
The domain sync task is responsible for ensuring the next due date, expiry date, and status are up-to-date on all Pending Transfer, Pending Registration, and Active status domains where a valid registrar module is set on the domain itself.
Contents
The Domain Sync Task
The domain sync task works by using the domain synchronization functions built into each registrar module (if the module supports Domain Sync Script in the documentation for the module) to check 50 domains per run from the oldest to newest in your WHMCS installation. Pending Transfer, Pending Registration, and Active status domains are handled separately, so it can do 50 of each during each run.
- Active domains will have their Expiry Date corrected to match the registrar if different. If the dates already match it will report "In Sync".
- Pending Registration domains will have their Expiry Date corrected to match the registrar if different, and Status set to Active once the registration is complete. If the dates already match it will report "In Sync".
- Pending Transfer domains will usually report an error until the transfer process is complete at which point the status will automatically be changed to Active, the Domain Transfer Completed email template sent and the Expiry Date obtained from the registrar.
When used with the eNom module, the script can also send the Domain Transfer Failed email template if the transfer process fails.
For example, if you are using eNom and have 150 Active and Pending Registration domains and 20 in Pending Transfer status, the script will check the 20 Pending Transfer status domains as needed during each run, along with 50 of the Active and Pending Registration status domains, starting over once it reaches the newest domain.
Depending on the configuration under Configuration () > System Settings > Automation Settings or, prior to WHMCS 8.0, Setup > Automation Settings, the domain sync task will adjust at least the Expiry Date and Status, with the possibility of the Next Due Date if "Sync Next Due Date" is configured. Once the domain sync cron job has completed, an e-mail will be sent to any admins whose administrator role has "System Emails" enabled. If "Domain Sync Notify Only" is enabled, no changes will be made and the e-mail will simply list the changes that would have been made.
Configuration
Use the following settings to configure the domain sync task at Configuration () > System Settings > Automation Settings or, prior to WHMCS 8.0, Setup > Automation Settings:
- Domain Sync Enabled
- Sync Next Due Date
- Domain Sync Notify Only
- Domain Expiry Sync Frequency
- Pending Transfer Sync Frequency
In version 7.6 and above, the Domain Synchronisation Task is handled by the main cron job. No further setup steps are required.
Configuration in WHMCS 7.5 and Earlier
In version 7.5 and earlier some of these settings are located in the Domains tab at Configuration () > System Settings > General Settings or, prior to WHMCS 8.0, Setup > General Settings.
An additional set up step is required to create a cron job to trigger the /crons/domainsync.php file:
Sample Cron Command
0 3 */2 * * php -q /home/username/crons/domainsync.php
The above example will run every 2 days at 3am.
Common Errors
Sync not supported by module
This indicates that the registrar module set on the domain in question does not support the domain sync functionality and no changes will be made to it as a result. This is most common with third party/custom modules and will need to be fixed by the developer to resolve this.
Curl error - could not connect to host
This is most commonly caused by not whitelisting the server's IP at your domain registrar (for example: eNom or ResellerClub) for API access. You will need to contact them and provide the IP from Help > License Information in your admin area for whitelisting to resolve this.