This guide is for you, if you already use a Content Delivery Network (CDN) to deliver your site. We will use Akamai as an example how to use with your existing CDN.

Existing configuration in the CDN prior to using

We have a site that we want to optimize by using The website is called The site is already configured in Akamai Ion and delivered via HTTPS.

The DNS record for points to, which is our Edge Hostname in Akamai.

In Akamai we use the origin as the location where the website is hosted.

The configuration of the origin in the Akamai Control Center looks like this:

1. Create a site in

First you need to create your site in Just put your origin address in the Origin field as you would when configuring without a CDN.
In our example, we will set our origin to server which we also use as the origin in Akamai at the moment:

Now you can configure with the optimizations and features you want and save the domain.

After saving the domain, you will get this error:

This is expected behaviour as the DNS record still points to Akamai and will also do so in the future. Please ignore this error when using behind a CDN.

You can now test the site configuration locally with the following entry to the hosts file (e.g. /etc/hosts ) with an entry corresponding to one of the IP addresses of

2. Changing the origin in the CDN

Now we have to change the origin in the CDN to point to instead of our original origin, which now serves as the origin for

You will use  as our new origin server. If you want to use SSL you will also have to change some of the settings regarding origin SSL verification.
The configuration of the origin would now look like this in our example using Akamai:

You can now save the new version of the configuration and deploy it to the Akamai staging environment. For reference how to test your configuration in the Akamai staging environment, please see this excellent guide from Akamai.
With the correct entry in your hosts file according to the documentation, you should be able to browse the website trough Akamai and
You should also be able to see delivered pages in the analytics section in

When your testing is successful, you can deploy your configuration to the Akamai production environment.


  • Even faster load times

  • Improved image compression

  • Less bandwidth used (= lower bill with your CDN provider)

  • Deeper insights into your infrastructure


Using with a CDN in front of it is easy and relatively straightforward and you should have no trouble adapting this guide to any other CDN provider. If you have any questions regarding using with the CDNs, please contact us. 

As there are plenty of CDN providers out there, we cannot provide detailed instructions for all of them but we are happy to help.

Did this answer your question?