Integrating your WooCommerce store with QuickBooks or Xero via Synder takes just a couple of clicks and enables automatic synchronization of all ongoing orders along with the auto-categorization and smooth reconciliation of synced data, allowing for an easy and accurate WooCommerce accounting. To make sure the setup process runs seamlessly for you, our team prepared the following guide, where you will learn how to avoid and troubleshoot 404 connection errors.

Overview:

  1. Why 404 error appears

  2. How to avoid the issue

  3. How to check if my link works properly

Why 404 error appears

Some WooCommerce store domains have subfolders, if users try to connect to the store using a site URL containing the subfolder, they will receive a 404 error. 
For example, John sells his products via his WooCommerce store in both the United States and Canada, so his website has two directories (subfolders):

  1. johnseller.shop/us
  2. johnseller.shop/ca

How to avoid the issue

Let’s keep John’s example. In order to properly connect to a WooCommerce store, users need to specify only a store URL  ‘johnseller.shop’ without any subfolder such as “/us” or “/ca” from the example.
To sum it up, make sure you use only a WooCommerce site URL and erase any subfolder details for the connection, this will allow you to avoid 404 connection errors.

Additional Cause: Cloudflare WAF Blocking Access to the /wp-json/ Endpoint

If your WooCommerce store uses Cloudflare services, the Cloudflare Web Application Firewall (WAF) might block access to the /wp-json/ endpoint. This endpoint is essential for Synder to communicate with your store. When blocked, it can result in a 404 error during the connection process.

How to Fix the Issue

To resolve this, you’ll need to adjust your Cloudflare WAF settings to allow access to the /wp-json/ endpoint. Follow these steps:

  1. Log in to your Cloudflare Dashboard and select your domain associated with the WooCommerce store.
  2. Navigate to the Firewall or WAF Section:
    • Click on the “Firewall” or “WAF” tab in the top menu.
  3. Create a New Custom Rule:
    • Click on “Create a Firewall Rule”.
  4. Configure the Rule Settings:
    • Rule Name: Assign a name like “Allow /wp-json/ Access”.
    • When incoming requests match…
      • Field: URI Path
      • Operator: “starts with”
      • Value: /wp-json/
  5. Choose the Action:
    • Set the action to “Skip”.
  6. Select WAF Components to Skip:
    • Check: “All remaining custom rules”
    • Leave Unchecked:
      • “All rate-limiting rules”
      • “All managed rules”
      • “All Super Bot Fight Mode Rules”
  7. Save and Deploy the Rule:
    • Click “Deploy” or “Save” to activate the rule.
    • Ensure this rule is placed before other rules to take precedence.

By setting up this custom rule, you instruct Cloudflare to bypass its firewall for the /wp-json/ endpoint, allowing Synder to successfully connect to your WooCommerce store.

Note: Adjusting firewall settings may impact your site’s security. It’s advisable to consult with your web administrator or a security professional to ensure that this change doesn’t expose your site to vulnerabilities.

How to check if my link works properly

You can also check if the link to your WooCommerce store is working properly. In order to do that, add “/wp-json/” in the address bar after the store domain, if the store domain is correct you will see json code appearing, otherwise, an error will be displayed.

  1. johnseller.shop/us/wp-json/ – ERROR 404
  2. johnseller.shop/wp-json/ – page with code

Reach out to the Synder team via online support chat, phone, or email with any questions you have – we’re always happy to help you!


Leave a Reply

Your email address will not be published. Required fields are marked *