Set Up Your Resource and CNAME

First you need to set up a website (resource) and set your DNS using your hosting provider’s admin (if your hosting provider uses cPanel you can see our guide called Integrate With cPanel Hosting).

Install CDN Plugin

1. Go to drupal.org/project/cdn.

2. Go to the latest CDN plugin version, right-click on the link and Copy Link Address. Then head into your Drupal admin and click on Modules.

3. To add the new plugin choose Install new module.

4. Paste the link address of the module (from step 2) into the Install from a URL box, and press Install. This will automatically add the CDN module to your installation of Drupal.

5. To enable the module scroll down to Performance and Scalability and check the Enabled function. Confirm changes by clicking Save configuration.

Configuration

8. Next click on the Details tab and on the CDN mapping option. There you need to copy and paste the Hostname which you have already configured in the CDNlion™ Dashboard.

See steps 9. – 12. for more details.

9. You should have already setup a website (resource) using CDNlion™ Dashboard. The setup provided you with a CNAME which has been set to pull the content from your domain. Open CDNlion™ Dashboard (app.cdnlion.com) to get your unique Hostname.

10. When you open Dashboard, find the website (resource) you are trying to configure and click Manage.

11. You will see Information on how to set up DNS right away. Under number 3 you should see the Hostname (Name) you’ve already set up and a unique CNAME code (Value).

12. Now copy the Hostname (Name), in this example cdn.viacaroli.cz, and go back to Drupal and paste it in the CDN Mapping field including the http:// and click on Save configuration.

13. Next you will see that there is an error message suggesting that you should enable ‘Aggregate and compress CSS files’. Check Agregate and compress CSS files and Aggregate Javascript files in the Bandwidth Optimization box.

14. Click on Save configuration.

Test

15. Awesome, you’re done! To make sure it is working, check the source code of your website. CSS and Javascript files, images and other files should now be loading from your hostname address. Another way to check if everything is working is to go to your CDN host name (from step 11), choose an asset (like an image), right-click on it and select inspect the element. You will see the code of this asset being sources from your hostname – like for example cdn.viacaroli.cz/image.jpg instead of www.viacaroli.cz/image.jpg.