Compatibility
Some Cloudflare features may need adjustments for compatibility.
Cloudflare compatibility
If your site uses Cloudflare, some Cloudflare settings including “bot fight mode” can prevent your site from reaching itself, which affects WordPress cron jobs, Wordfence scans, and other features. On the Diagnostics tab of the Wordfence Tools page, the “Connecting back to this site” and “Connecting back to this site via IPv6” tests can show if the site is blocked from reaching itself.
To set up Cloudflare to allow connections from your site’s server back to itself, you can add your server’s IP(s) to Cloudflare’s “IP Access Rules”, following the steps below:
- Log in to Cloudflare
- Select your site
- On the left menu, click “Security”
- On the Security menu, select “WAF”
- Click the “Tools” tab
- In the “IP Access Rules” section, enter your server’s IP address in the field that says “IP, IP range, country name, or ASN”
- Change the “Block” option to “Allow”
- Change the “This website” option to “All websites in account” if you have more than one site on the same server
- In the “Add a note” field, type “My server IP” so you remember why the IP was allowed
- Click the “Add” button
- If your server has a public IPv6 address, repeat steps 6 through 10 for that address
If you don’t know your server’s public IP address, or if outbound requests from your host have a different public IP than the server itself, you may need your host’s help. Alternately, you may be able to find the IP address that is being blocked by going back to the left side menu on Cloudflare, clicking “Security”, and then scrolling down to the “Activity log” to find recently blocked IPs. Be sure to only allow IPs that you know are legitimate, as this list can also show blocks of malicious traffic.