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

# Integrate a CDN resource with Webasyst

Webasyst can direct image, CSS, and JavaScript URLs generated by the Site app to a Gcore CDN [custom domain](/cdn/cdn-resource-options/general/create-and-set-a-custom-domain-for-the-content-delivery-via-cdn) through the **CDN** field. Create a [CDN resource](/cdn/getting-started/create-a-cdn-resource/create-a-cdn-resource) before starting the integration.

<Warning>
  Back up the site files and database before making changes. These steps assume the default Site app settings layout; the **CDN** setting affects generated asset URLs, while hardcoded absolute URLs in custom themes require separate updates.
</Warning>

Before configuring Webasyst, collect the complete HTTPS URL to enter in the **CDN** field: `https://cdn.site.com`.

<Steps>
  <Step title="Open the CDN resource">
    In the [Gcore Customer Portal](https://portal.gcore.com), navigate to **CDN** > **CDN resources** and open the resource.
  </Step>

  <Step title="Copy the custom domain">
    Note the **custom domain** shown for the resource and form its complete URL by adding the `https://` prefix: `https://cdn.site.com`.
  </Step>

  <Step title="Confirm the DNS CNAME">
    Confirm that the custom domain has a CNAME record pointing to the Gcore target hostname shown in the Customer Portal (`cl-****.gcdn.co`). Do not put the `gcdn.co` hostname in Webasyst.
  </Step>

  <Step title="Confirm SSL">
    Confirm the custom domain has a valid SSL certificate so assets can load over HTTPS.
  </Step>

  <Step title="Verify origin access">
    Request a known CSS, JavaScript, or image 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.
  </Step>
</Steps>

Then configure Webasyst:

<Steps>
  <Step title="Open the Site settings">
    Log in to the Webasyst administration area, open the **Site** app, and select **Settings**.
  </Step>

  <Step title="Enter the CDN URL">
    In the **CDN** field, enter the complete custom domain URL copied from the Customer Portal: `https://cdn.site.com`.
  </Step>

  <Step title="Save the configuration">
    Save the settings.
  </Step>

  <Step title="Confirm the integration">
    1. Open the browser developer tools.
    2. Select the **Network** tab.
    3. Refresh the page.
    4. Confirm that Webasyst-generated asset URLs load from the custom domain instead of the original domain.
    5. Update any hardcoded absolute asset URLs in custom theme files separately.
  </Step>
</Steps>
