Problem
You see one of the following errors:
Curl Error - Couldn't connect to host (7)
Server Command Error - Curl Error - Couldn't connect to host (7)
Curl Error: Connection refused - Code 7
Cause
This error indicates that your firewall is blocking a necessary port or, if you see it while running the domain sync task, your IP address is not whitelisted with the domain registrar.
For example, if you see Server Command Error - Curl Error - Couldn't connect to host (7)
while working with a hosting server or provisioning module, a firewall is preventing WHMCS from accessing your hosting server.
Solution
Make certain that the necessary ports are open for inbound and outbound connections on all of your servers. cURL uses port 443
for most secure connections.
If you see this error while running the domain sync task, make certain that the WHMCS server’s IP address is whitelisted with your domain registrar. You can find the correct IP address at Help () > License Information.
- To find the port numbers that each hosting control panel uses, see your server module’s documentation.
- For steps to whitelist your IP address, check the domain registrar module’s documentation or contact the domain registrar.
Last modified: 2025 March 27