You are viewing the legacy StackPath SecureCDN Help Center. Please use if you signed up after July 1, 2018 or log in through

StackPath Support

Custom SecureCDN Integration

This tutorial assumes a site is created.

It's important to understand the difference between an origin URL and CDN URL before moving further in this tutorial.

An origin URL is a URL such as that points to a main server. An CDN URL is the URL automatically generated after a site is created. This looks like If a custom CDN URL is created using a CNAME record, the CDN URL looks like


If implementing StackPath CDN with a custom-built site, go into the source code of the site and point static content to its corresponding CDN location. To do this, replace the origin URL with the CDN URL.

The location of files on CDN sites mirror the location of static content on the origin server. For instance, if there is a file on the origin located at, its location on our CDN would be

Therefore, changing the URLs in your source code looks something like this:


<img src="ORIGIN_URL/images/logos/big.jpg" alt="" /> OR

<img src="/images/logos/big.jpg" alt="" />


<img src="CDN_URL/images/logos/big.jpg" alt="" />

All you're doing is swapping the origin URL for the CDN URL.

Do not alter the URLs of pages and dynamic content.

Return to top