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

# Integrate CDN resource with Perch

Before you take any steps please back up your files and database. The plugin works only with default CMS pattern. If you manually changed CMS patterns, the plugin might not help you.

Login to your Perch control panel at *yoursite.com/perch*. Open this file: `perch/config/config.php`. Search the following line:

```
define('PERCH_RESPATH', PERCH_LOGINPATH . '/resources');
```

Update the line to the following. Instead of cdn.site.com type in the CNAME that you specified in the [Gcore Customer Portal](https://portal.gcore.com/cdn/resources/list). Ensure that your [CNAME record has been configured](/cdn/cdn-resource-options/general/create-and-set-a-custom-domain-for-the-content-delivery-via-cdn) in a proper way before using it for integration

```
define('PERCH_RESPATH', 'http://cdn.site.com' . PERCH_LOGINPATH . '/resources'); 
```

Where [http://cdn.site.com](http://cdn.site.com) is the domain of your CDN resource.

In case you have custom buckets lists and want to deliver them through CDN, you need to add a prefix to `web_path` parameters.

Open this file: `perch/config/buckets.php`. Search the following line:

```
'web_path' => '/my/bucket/path',
```

Update the lines as follows:

```
'web_path' => 'http://cdn.site.com/path/to/my/bucket/', 
```

Where [http://cdn.site.com/path/to/my/bucket/](http://cdn.site.com/path/to/my/bucket/) is the path to your bucket with the domain name of your CDN resource.

Integration has been completed! We highly recommend you to check the HTML code of your web page to ensure that URLs have been rewritten properly from your original ones to CNAME from the Gcore Customer Portal.

To do that press **F12** or open Developers Tools in your browser, choose the Network tab and refresh the page. All static files should have your CNAME in URLs.
