How do I setup my website to be delivered via CDN?

If your website runs a popular Content Management System (CMS) such as:¬†WordPress, Memento, Drupal, OpenCart, Joomla, Social Engine, etc refer to our guide on how to integrate your website CMS with a Content Delivery Network (CDN) service.If your CMS does not support CDN integration or you are running a custom website, you will need to manually point your content to CDN. It’s quite easy, essentially you’ll need to adapt your source code to serve static content from selected CDN Hostname (Host).

Assuming you have the following basic CDN setup;

Origin: origin-static.mywebsite.com Origin Pull (Customer Server)
Host: static.mywebsite.com
Caching Policy: Honour Caching Headers set max-edge

CDN CNAME URL: yourwebsite.something.cdnprovider.net

In order to have objects called from the CDN, after CNAME you’ll need to replace the origin path inside your tags with the new “Host” or CDN CNAME URL.

If you use the “Host” make sure you have already CNAMED the “Host” to the CDN CNAME URL by adding a new DNS record into your DNS settings. If the “Host” has not been CNAMED content will not be delivered from the CDN.

Here’s an example of CDN integration:

replace
<img src=”mywebsite.com/path/to/image.jpg” />
with
<img src=”cdn.mywebsite.com/path/to/image.jpg” />
or
<img src=”something.cdnprovider.net/path/to/image.jpg” />

The same example can be followed with other types of static cacheable content such as CSS, JS, SWF and any other you wish to delegate to CDN.