This documentation is only valid for older versions of Wordfence. If you are using Wordfence 7 or later, please visit our.
My Scan terminated with an error "...error connecting to the the Wordfence scanning servers..."
Errors about connecting to the Wordfence scanning servers usually mean that your web server (the machine that runs your WordPress website) can’t connect to our scanning servers.
An example message is:
Scan terminated with error: We received an error response when trying to contact the Wordfence scanning servers. The HTTP status code was  and the error from CURL was couldn’t connect to host.
If you are having issues connecting to the Wordfence servers when scanning or getting a key, here are some things you can try:
- Uncheck "Enable ssl verification" on the bottom of the options page.
- Make sure your cUrl is not outdated and allows outbound connections. Run the connectivity tester (near bottom of the Wordfence options page) to test. If you receive an error, a ticket with your hosting provider may be required.
- Check iptables (linux) to make sure you are accepting those connections (many thanks to Patrick)
The following code should be checked and adjusted for your particular site, by an experienced server manager or your hosting company:
sudo iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT sudo iptables -t filter -A OUTPUT -p tcp --dport 443 -j ACCEPT
When you run a scan your web server needs to be able to connect to our scanning server which is noc1.wordfence.com, so that it can send hashes of files and signatures for comparison against known bad items. Your web server must be able to connect to port 443 and port 80 of noc1.wordfence.com. To test if it can do this, you can SSH to your server and run the following commands. If you don’t know how to do this, ask your administrator or hosting company.
telnet noc1.wordfence.com 80
telnet noc1.wordfence.com 443
You should get a response that says "Connected to noc1.wordfence.com." As long as you can connect to both port 80 and port 443, you should be able to scan.