> ## Documentation Index
> Fetch the complete documentation index at: https://connect-docs.supertab.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy on WordPress

> Serve your RSL license and enforce CAP on a WordPress site using the Supertab Connect plugin.

The Supertab Connect WordPress plugin handles both RSL license serving and CAP enforcement without CDN configuration or custom code. It intercepts requests to `/license.xml`, fetches and caches your license from Supertab Connect, and validates `Authorization: License` tokens on automated requests.

* **Requirements:** WordPress 6.4 or higher (self-hosted or WordPress VIP).
* **Plugin:** [Supertab Connect](https://wordpress.org/plugins/supertab-connect/)

## Before You Start

You need:

* A **Supertab Connect merchant account** – [contact sales to sign up](https://www.supertab.co/contact)
* A **Website** registered in the dashboard — select **WordPress** as the integration type
* Your **Website URN** — found in Website settings, looks like `urn:stc:merchant:system:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`

***

## Install the Plugin

In your WordPress admin, go to **Plugins → Add Plugin**, search for **Supertab Connect**, install, and activate. The plugin will redirect you to its settings page on first activation.

***

## Configure RSL

In **Settings → Supertab Connect**, paste your **Website URN** into the Website URN field and save.

Once saved, visit `https://yourdomain.com/license.xml` to confirm your RSL license is being served.

<Note>
  If the license doesn't reflect recent changes, your hosting stack may have a caching layer in front of WordPress. Purge the cache for `/license.xml` from your host's control panel.
</Note>

***

## Configure CAP

<Steps>
  <Step title="Generate a Merchant API key">
    In the Supertab Connect dashboard:

    1. Open your **Website Details**
    2. Go to the **API Keys** section
    3. Click **Generate new key**
    4. Copy the generated key

    <Warning>
      Treat the Merchant API key as a secret. Do not expose it in frontend code or share it outside the WordPress admin environment.
    </Warning>
  </Step>

  <Step title="Enable CAP in the plugin">
    In WordPress, go to **Settings → Supertab Connect**:

    1. Find the **License Verification** section
    2. Paste the generated Merchant API key into the **Merchant API key** field
    3. Click the **Enable CAP** checkbox
    4. Click **Save Changes**
  </Step>

  <Step title="Configure Active Paths">
    By default, CAP protects your entire site using a single `*` wildcard path. You can narrow protection to specific sections of your site.

    1. In the **Active Paths** section, review the default path
    2. Optionally remove `*` and add specific path patterns
    3. Click **Add Path** to add additional patterns
    4. Click **Save Changes**

    **Path pattern examples:**

    | Pattern     | Matches                    |
    | ----------- | -------------------------- |
    | `*`         | Entire site (default)      |
    | `blog/*`    | All URLs under `/blog/`    |
    | `premium/*` | All URLs under `/premium/` |
    | `pricing`   | Only the `/pricing` page   |

    <Note>
      Paths support `*` for wildcards. Both `/sample-page` and `/sample-page/` (trailing slash) are treated as the same path.
    </Note>
  </Step>

  <Step title="Verify setup">
    After saving the plugin settings:

    1. Return to the Supertab Connect dashboard
    2. Use **Verify Setup** for CAP
    3. Confirm that verification succeeds

    Once verification passes, CAP is active on your WordPress site.
  </Step>
</Steps>

***

## Update robots.txt

Add a `License:` directive to your `robots.txt` so crawlers can discover your license:

```txt theme={null}
License: https://yourdomain.com/license.xml
```

The URL must be fully qualified. Place it at the top of the file, before any `User-agent:` directives.

***

## Publishing New Versions

When you publish a new version of your RSL license, click **Publish** in the RSL Editor. Follow the on-screen steps to refresh the license on your WordPress site.

<Warning>
  If you can't see the latest version at `/license.xml`, your hosting environment may have additional caching layers. You may need to purge these from your host's control panel.
</Warning>

***

## Troubleshooting

| Problem                             | What to check                                                                                                                 |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `license.xml` returns 404           | Confirm the Website URN is saved correctly in plugin settings                                                                 |
| CAP is not enforcing                | Confirm the CAP checkbox is enabled, the API key matches the current key in the dashboard, and the plugin settings were saved |
| License shows stale content         | Purge your hosting cache for `/license.xml`                                                                                   |
| Human visitors are being blocked    | Check that your WordPress permalink settings are not interfering with the plugin's request interception                       |
| CAP verification fails in dashboard | Confirm the Merchant API key in WordPress matches the current key in Supertab Connect                                         |

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Acquire Licenses" icon="key" href="/guides/acquire-license">
    Test the protected flow by obtaining a license token and making a licensed request.
  </Card>

  <Card title="Crawler Authentication Protocol" icon="shield" href="/licensing/crawler-authentication-protocol">
    How CAP works, what it enforces, and what it leaves to you.
  </Card>
</CardGroup>
