If you are experiencing connection issues with your WooCommerce store, it is often caused by a conflict with your website's security settings, particularly if you are using Cloudflare. Cloudflare's security challenges can sometimes block the API requests that Link My Books uses to communicate with your store.
This article provides step-by-step instructions for whitelisting our server's IP address in Cloudflare to ensure a stable connection.
The Cause of the Error
Cloudflare's security settings (such as the "Just a moment..." challenge or WAF rules) are designed to protect your site from bots and malicious traffic. However, these rules can sometimes block legitimate API calls from services like Link My Books.
To resolve this, you need to tell Cloudflare to trust and allow our server's outbound IP address: 35.210.128.61.
1. Instructions for Allowing Our Server IP in Cloudflare
This is the most direct method to ensure our API requests are not blocked.
Log in to Cloudflare: Go to https://dash.cloudflare.com and log in. Select the specific domain for your WooCommerce store from the dashboard.
Navigate to the WAF (Web Application Firewall): In the left-hand menu, go to Security β WAF. You may then need to click on Tools (for older dashboards) or Custom Rules (for newer dashboards).
Add an IP Access Rule: Find the section for IP Access Rules and click the 'Add' button.
In the rule, enter our server IP address: 35.210.128.61.
Set the action to 'Allow'.
Set the scope to 'This Website' (this is more secure than applying it to all websites in your account).
Click 'Save'.
2. Optional: Create a More Specific WAF Custom Rule
For enhanced security, you can create a custom WAF rule that only allows our server IP to access the specific API endpoints, keeping the rest of your site protected.
Go to Custom Rules: In your Cloudflare dashboard, navigate to Security β WAF β Custom Rules.
Create Rule: Click 'Create Rule'.
Give the rule a clear name, such as "Allow Link My Books API."
Set the conditions:
Field: 'IP Source Address'
Operator: 'equals'
Value: 35.210.128.61
Then, click 'And' to add a second condition.
Field: 'URI Path'
Operator: 'contains'
Value: /wp-json/wc/
Set the action: 'Allow'
Click 'Deploy'.
This rule is now live and will only allow our server IP to access the WooCommerce API endpoints.
3. Final Step: Test the Connection
Once you have saved your IP access rule (or deployed the custom WAF rule), we will retry calling your WooCommerce API. If the rule is configured correctly, our system should now receive the necessary data instead of being blocked, and your connection should be successful.
If the issue persists, please don't hesitate to reach out to our support team for further assistance. We can then perform additional checks from our side.
If you have any questions about this article or feedback on how we could make it better please reach out to the support team via the blue chat icon on the bottom right of the page or via email to [email protected].