There are many different ways to implement the StackPath CDN with your website. If you developed a custom website, then we can help you integrate it with our StackPath services.
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 http://yourdomain.com that points to the main server. A CDN URL is the URL automatically generated after a CDN Site is created. This looks like http://site.company.stackpathdns.com. If a custom CDN URL is created using a CNAME record, the CDN URL looks like http://cdn.yourdomain.com.
If implementing the 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 mirrors the location of static content on the origin server, so you do not have to edit the path. For instance, if there is a file on the origin located at yourdomain.com/images/logos/big.jpg, its location on our CDN would be http://something.stackpathcdn.com/images/logos/big.jpg.
Changing the URLs in your source code will look 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, as dynamic content will not cache correctly.