> ## 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>
  The license is cached in the WordPress database. If `/license.xml` doesn't reflect recent changes, click **Purge license.xml from cache** in the **Your RSL License** section, then reload. If it's still stale, your hosting stack may have its own caching layer — purge `/license.xml` from your host's control panel too.
</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>

***

## Analytics & Bot Classification

<Note>
  Available in the Supertab Connect plugin **1.3.0-beta** and later.
</Note>

Once your Merchant API key is saved (see [Configure CAP](#configure-cap)), you can share agent & bot traffic analytics with Supertab to get classification and traffic insights in your dashboard.

In **Settings → Supertab Connect**, check **Enable agent & bot classification**, then click **Save Changes**. It's **off by default** and is a separate toggle from **Enable CAP** — you can turn on analytics whether or not you enforce CAP.

***

## 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 license version in Supertab Connect, the plugin picks it up automatically — `license.xml` updates on the next fetch. Because the license is cached in the WordPress database, changes may not appear right away.

To refresh immediately, go to **Settings → Supertab Connect → Your RSL License** and click **Purge license.xml from cache**. Then confirm the update at `https://yourdomain.com/license.xml`.

<Warning>
  If the update still doesn't appear, your hosting environment may have an additional caching layer in front of WordPress. Purge `/license.xml` from your host's control panel too.
</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         | Click **Purge license.xml from cache** in the plugin's **Your RSL License** section; if still stale, 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>
