---
title: "Content Sync Connection Test Failed: Fix 401, 403 and Blocked REST API Errors"
url: "https://wpimportexport.com/content-sync-connection-test-failed/"
description: "Fix a failed Content Sync connection between WordPress sites: invalid API key, firewall 403, HTTP authentication, redirects and a blocked REST API."
type: post
published: 2026-11-08T21:20:55+00:00
modified: 2026-11-18T13:09:28+00:00
categories: ["Content Sync", "Tutorials"]
tags: ["Content Sync", "Import Export by RockStarLab"]
docs_topics: ["Sync and migration"]
---

# Content Sync Connection Test Failed: Fix 401, 403 and Blocked REST API Errors

Content Sync in [Import Export by RockStarLab](https://wordpress.org/plugins/import-export-by-rockstarlab/) (Free) connects two WordPress sites through the REST API. When you add a site or click **Test Connection** and it fails, the message tells you where the request stopped: at the API key, at a firewall, at password protection, at a redirect or at a missing plugin. Below is each message, its cause and the fix.

## Short Answer

- **Invalid API key**: the key was regenerated or copied incompletely. Copy it again from **Import Export → Content Sync → This Site Configuration** on the other site and update the connection.
- **Firewall refused the request (HTTP 403)**: a security plugin, host firewall or Cloudflare rule blocks `/wp-json/`. Allow `/wp-json/rsl-ie/v1/`.
- **Username and password (HTTP authentication)**: the staging site is password-protected at the server. Exclude `/wp-json/rsl-ie/v1/` from the protection or switch it off while you sync.
- **Redirects to …**: enter the final address (https, www) as the site URL.
- **Plugin not installed or activated**: activate Import Export by RockStarLab on the other site.

## How the connection check works

Each site has its own API key. To connect site A to site B, you copy B’s key into A. When you click **Test Connection**, A sends a request to B’s REST API at `https://site-b/wp-json/rsl-ie/v1/validate` with that key in the `Authorization` header. B checks the key and answers. Anything between the two sites that changes the request or the answer makes the test fail: a firewall, a login wall, a redirect, or a missing plugin on B.

The key never follows a redirect. This protects it from being sent to an address you didn’t enter.

## Invalid API key

This is the most common message. It appears when the key on the other site was regenerated (for example after cloning the site, or with the **Regenerate** button), or when part of the key was lost while copying.

![Content Sync page: error notice Invalid API key. Copy the key again from Import Export > Content Sync on the remote site; connection Staging with status Error](https://wpimportexport.com/wp-content/uploads/2026/11/01-connection-test-invalid-api-key.webp)

_The key on the other site changed: the test reports an invalid API key._

To fix it:

1. On the other site, go to **Import Export → Content Sync** and click **Show Details** under **This Site Configuration**.
2. Click **Copy** next to the API key. Use the button rather than selecting the text, so no character is left out.
3. On your site, click the pencil icon next to the connection, paste the key into **API Key** and click **Save Connection**. The key is checked before it’s saved.

![This Site Configuration on the remote site: Site Name, Site URL and a hidden API Key with Copy and Regenerate buttons](https://wpimportexport.com/wp-content/uploads/2026/11/02-copy-api-key-on-remote-site.webp)

_Copy the key on the other site with the Copy button._

After saving, the status changes to **Active**, and **Test Connection** shows “Connection successful. API key is valid.”

![Content Sync page: notice Connection successful. API key is valid; connection Staging with status Active](https://wpimportexport.com/wp-content/uploads/2026/11/03-connection-successful.webp)

_After updating the key, the connection is Active again._

If the message says the key is right but the remote site “has not activated it yet”, an administrator on that site has to open **Import Export → Content Sync** once. The key doesn’t change.

## A firewall refused the request (HTTP 403)

![Error notice: A firewall or security service on the remote site refused the request (HTTP 403). Allow requests to /wp-json/rsl-ie/v1/ from this site.](https://wpimportexport.com/wp-content/uploads/2026/11/04-error-firewall-refused.webp)

_A firewall stopped the request before WordPress._

The other site answered with an error page instead of a WordPress response. The request was stopped before it reached WordPress, usually by:

- a security plugin with a firewall (Wordfence, Solid Security, All In One WP Security) that blocks REST API requests from other servers;
- the host’s web application firewall or ModSecurity rules;
- Cloudflare WAF rules, Bot Fight Mode or a country block.

Allow requests to `/wp-json/rsl-ie/v1/`, or allowlist the IP address of the server that runs the other site. Every request to this path still needs the site’s API key, so allowing the path doesn’t open the site to anyone without the key. Then click **Test Connection** again.

### Plugins that limit the REST API to logged-in users

Plugins such as Disable WP REST API, and similar settings in security plugins, answer REST requests from visitors with “REST API restricted to authenticated users”. Content Sync requests are signed with the site key rather than a login, so the plugin lets them through, and the test succeeds with such a plugin active. If another tool still blocks them, the message names the error code it returned (for example `rest_disabled`), so you know which setting to change.

## The remote site asks for a username and password

![Error notice: The remote site asks for a username and password before WordPress loads (HTTP authentication, common on staging sites).](https://wpimportexport.com/wp-content/uploads/2026/11/05-error-http-authentication.webp)

_Password protection on a staging site._

Many staging sites are protected with HTTP authentication (the browser’s username and password prompt, often enabled in the host panel or with `.htpasswd`). The server asks for that password before WordPress loads, so the request never reaches the plugin.

Exclude `/wp-json/rsl-ie/v1/` from the protection, or turn the protection off while you sync and back on afterwards. Some hosts (for example in their staging settings) let you allow specific IP addresses instead.

## The remote site redirects to another address

![Error notice: The remote site redirects to https://staging.example-store.com. Enter the address it redirects to as the site URL.](https://wpimportexport.com/wp-content/uploads/2026/11/06-error-redirect.webp)

_The address redirects: use the final address._

The address in the connection isn’t the site’s final address. Typical cases: `http://` when the site forces `https://`, `example.com` when it redirects to `www.example.com`, or an old domain after a move. Edit the connection and enter the address shown in the message. You can check a site’s address under **Settings → General → Site Address (URL)** on that site.

## Plugin not installed or activated on the remote site

![Error notice: Import Export by RockStarLab plugin is not installed or activated on the remote site.](https://wpimportexport.com/wp-content/uploads/2026/11/07-error-plugin-not-active.webp)

_The plugin isn't active on the other site._

The other site has a working REST API but no Content Sync routes. Install and activate Import Export by RockStarLab there. If it’s active, check that the plugin is the current version on both sites, and that the address points to the right WordPress site (not a different installation in a subfolder).

## Other messages

| Message | Cause | Fix |
| --- | --- | --- |
| No WordPress REST API answered at this address | The address points to something other than the WordPress home, or the REST API is turned off completely. | Use the home address of the site, without `/wp-admin`. Open `https://site/wp-json/` in a browser: it should show JSON. |
| Cannot connect to remote site: cURL error 6 / 7 / 28 | The server can’t resolve the name, reach the server, or gets no answer in time. | Check the spelling of the domain and that the site is online from the outside. A live site can’t reach a `.local` or `localhost` address on your computer. |
| Cannot connect to remote site: cURL error 35 / 60 | SSL problem: an expired or self-signed certificate, or old TLS. | Renew the certificate, or use the `http://` address on local and test sites. |
| This site is already connected | A connection with the same address exists. | Edit the existing connection instead of adding a new one. |

Two common mistakes are handled automatically. If you paste an address with `/wp-admin/` or `/wp-login.php`, it’s saved as the site’s home address. Sites with plain permalinks, which have no `/wp-json/` path, are reached through `?rest_route=`.

## Check and fix the connection with an AI agent

If your site is connected to an AI agent through the WordPress MCP Adapter (see [connecting Claude Code to WordPress](https://wpimportexport.com/connect-claude-code-to-wordpress-mcp/)), the agent can run the same check with the `rsl-ie/connection-list` and `rsl-ie/connection-test` abilities and report the cause. A prompt that works:

```
List the Content Sync connections on this site and test each one.
For every connection that fails, quote the error message and tell me
what to change on the other site. Don't change any connection.
```

The agent lists the connections, tests them one by one and returns the same message you see in the admin. For example: “A firewall or security service on the remote site refused the request (HTTP 403). Allow requests to /wp-json/rsl-ie/v1/ from this site.” After the firewall rule is changed, ask it to test again. It reports “Connection successful. API key is valid.” and the connection is back to Active.

To update a key, the agent can use `rsl-ie/connection-update` with the new key. Paste the key in the chat only if you trust where the conversation is stored. Otherwise, update it yourself in the admin as shown above.

## FAQ

### Is it safe to allow /wp-json/rsl-ie/v1/ in my firewall?

Every Content Sync route checks the site’s API key. Without the key, a request to these routes is refused. Keep the key private and regenerate it if you think it leaked; then update the connection on the other site.

### Do both sites need the plugin?

Yes. Both need Import Export by RockStarLab active. Content Sync is part of the free plugin.

### Does the test change anything on the other site?

No. It only checks the address and the key.

### Why does the status stay “Error” after I fixed the problem?

The status updates on the next check. Click **Test Connection**, or save the connection again.

### Can a local site connect to a live site?

A local site can send requests to a live site, so pushing from local to live works. A live site can’t reach a site that runs only on your computer. See [pushing from LocalWP to a live site](https://wpimportexport.com/localwp-to-live-site-push-content-without-a-full-migration/).

## Related Guides

- [How to Sync Content Between Two WordPress Websites Without Export Files](https://wpimportexport.com/how-to-sync-content-between-two-wordpress-websites-without-export-files/)
- [How to Push WordPress Staging to Live Without Overwriting the Database](https://wpimportexport.com/how-to-push-wordpress-staging-to-live-without-overwriting-the-database/)
- [Staging to Production Checklist for Freelancers](https://wpimportexport.com/staging-to-production-checklist-client-sites/)
- [WordPress MCP Adapter Errors and How to Fix Them](https://wpimportexport.com/wordpress-mcp-adapter-errors/)
- [How Content Sync Works: API Keys, Push, Pull and What Gets Copied](https://wpimportexport.com/how-content-sync-works-api-keys-push-pull/)

Get the free plugin on [WordPress.org](https://wordpress.org/plugins/import-export-by-rockstarlab/).
