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

# Integrate a CDN resource with PyroCMS 2.x

> Configure a Gcore CDN resource custom domain in PyroCMS 2.x admin integration settings to serve static assets.

PyroCMS 2.x can serve static assets through a Gcore CDN resource by setting a custom domain in the admin panel's Integration settings.

Create a [CDN resource](/cdn/getting-started/create-a-cdn-resource/create-a-cdn-resource) before starting the integration. Configure its [custom domain](/cdn/cdn-resource-options/general/create-and-set-a-custom-domain-for-the-content-delivery-via-cdn) with a valid CNAME record and an active SSL certificate.

## PyroCMS 2.x

This procedure assumes a PyroCMS 2.x installation with the standard local static-asset layout and an **Integration** CDN field in the admin panel.

> [!WARNING]
>
> Back up site files and the database before making changes.

**1. Locate the custom domain**

In the [Gcore Customer Portal](https://portal.gcore.com), find the custom domain on the [CDN resources](https://portal.gcore.com/cdn/resources/list) page.

**2. Verify origin access**

Identify a known static asset used by the site. Request the same path directly from the protocol and hostname configured as the CDN origin:

```text theme={null}
https://origin.example.com/path/to/known-asset.css
```

Continue only after the origin returns the expected file without a `403` or `404` response.

**3. Open the Integration settings**

Log in to the PyroCMS admin panel and navigate to **Settings** > **Integration**.

**4. Set the CDN domain**

Enter the custom domain as a hostname without the protocol or trailing slash: `cdn.site.com`.

This setting changes URLs generated through the PyroCMS Asset library. Update hardcoded asset URLs in templates separately because the Integration setting doesn't rewrite them.

**5. Apply the changes**

Click **Save**.

**6. Verify asset delivery**

Open the browser's developer tools by pressing <kbd>F12</kbd>, select the **Network** tab, and refresh the page. Asset-library-generated URLs should load from the custom domain instead of the origin domain.
