Handling Cloudflare Blocks
If you have Cloudflare enabled on your Magento or WooCommerce store, it may block OneCart from accessing your store's API. Learn how to resolve this so your orders and inventory can sync properly.
If you have Cloudflare enabled on your Magento or WooCommerce store, it may block OneCart from accessing your store's API. Learn how to resolve this so your orders and inventory can sync properly.
Cloudflare is a popular web security and CDN service. When enabled on your store, it can sometimes identify OneCart’s server as a bot and block our API requests. This means:
When OneCart detects this block, we automatically deactivate your shop in OneCart to stop unnecessary retries, and send you an email notification.
You have two options:
This is the recommended approach. You’ll create a firewall rule that allows OneCart’s API traffic through while keeping Cloudflare protection for your regular website visitors.
For Magento stores:
/rest/V1/For WooCommerce stores:
Follow the same steps above, but use these values:
/wp-json/wc/Important: This WAF bypass rule applies to all traffic hitting these API paths, not just OneCart. Any bot, crawler, or attacker traffic targeting these endpoints will also bypass Cloudflare’s protection. This is generally acceptable because API endpoints require authentication (API keys/tokens) to return any data, but you should be aware that Cloudflare will no longer filter requests to these paths.
If you prefer to keep Cloudflare’s full protection active on all paths including your API, OneCart can provision a dedicated IP address for your specific shop. This gives you a fixed IP that you can whitelist in Cloudflare.
What’s included:
To request a dedicated IP, contact us at hello@lachmann-tech.com.
Once you’ve applied one of the fixes above, you need to reactivate your shop in OneCart. See our guide: Reactivating a Disabled Shop for step-by-step instructions.
For security and reliability reasons, OneCart uses dynamic cloud infrastructure that does not have a single fixed IP address. This is standard practice for modern cloud applications and ensures better uptime and security for all our customers.
The Cloudflare WAF bypass rule (Option 1) is the simplest and most effective solution — it allows API traffic through while maintaining your store’s security for regular visitors.
If you’re unsure how to configure Cloudflare, reply to the notification email or contact us at hello@lachmann-tech.com and we’ll walk you through it.