How to resolve WooCommerce API Errors Caused by Firewall Blocking?
If Stock Sync cannot connect to your WooCommerce store and shows API authorization errors, a firewall or security service such as Cloudflare or Cloudways may be blocking the connection. This guide shows how to turn off the blocking feature and allow Stock Sync through.
How to Resolve WooCommerce API Errors Caused by Firewall Blocking
- Turn off Bot Fight Mode: Log in to your Cloudflare dashboard, type
Bot Fight Modein the Quick Search bar, and turn the setting off. - Open Custom Rules: Go to Security → WAF → Custom Rules.
- Create a new rule: Click Create Rule and name it
Allow Stock Sync WooCommerce API. - Add the whitelisted IPs and expression: Use this expression, which whitelists the Stock Sync IPs and the WooCommerce API path:
(ip.src in {52.202.180.173 34.197.203.250 52.20.189.51}) or (http.request.uri.path contains "/wp-json/wc/")
- Set the action: Select Skip as the action, then select all security features.
- Move the rule to the top: Drag this rule to the top of your rule list.
- Deploy the rule: Click Deploy.
Key Rules & Technical Details
- Whitelisted IPs: The rule allows
52.202.180.173,34.197.203.250, and52.20.189.51. - Rule order: The rule must be at the top of the list so it is applied before other security rules.
Troubleshooting Steps
- Issue: The connection still fails after the rule is deployed → Solution: Check that Bot Fight Mode is off and that the rule is at the top of the list, then reconnect your store.
- Issue: The "Authorize" page keeps appearing, or API keys keep multiplying → Solution: Check whether your hosting provider, such as Cloudways, is still blocking Stock Sync, and ask them to allow the IPs above.
Good Articles to Continue
- How to resolve WooCommerce API Errors Caused by Firewall Blocking? → The published version of this guide.
- What is the whitelist IP address for standard connections? → Find the IP address to allow for feeds and API connections.
- How can I whitelist an IP address for accessing a URL? → Ask a supplier or host to allow Stock Sync's server IP.
Updated on: 13/11/2026
Thank you!
