Integration with CDN. Integrate CDN with a site.

As soon as you created a CDN Resource you need to change a website HTML code to deliver your static assets through the CDN.

Click Setup Instructions tab in a CDN Resource Settings.

Screenshot-2018-1-1_G-Core_Labs_Resources_Instructions.png

Manual Integration

To deliver files through the CDN, replace your domain name with the CNAME in static files URLs.

Look how to configure a CNAME record as your CDN content can be accessed only via a CNAME.

An example of integration with the G-Core CDN

Replace:

<img src="http://site.com/path-to-image/image.jpg" />

With:

<img src="http://cdn.site.com/path-to-image/image.jpg" />

The same example can be applied to other types of static files, such as CSS, JS,  SWF and so on.

Please note that you cannot use CDN URL (d.gcdn.co) in URLs for your static files. CDN will not work with URLs like this one <img src="http://d.gcdn.co/path-to-image/image.jpg" />

CMS Integration

Some CMS like Wordpress, Drupal and Joomla, have plugins for CDN integration.

 

 

Was this article helpful?
Recently viewed articles