Discourse CDN Integration
This Discourse CDN guide will go through the process of integrating your Discourse forum with KeyCDN for faster content delivery. Discourse is a powerful, open source, forum platform that is responsive, dynamic and best of all, very easy to use.
It's built to be SEO friendly meaning it's highly crawlable by the search engines and is all around SEO optimized. As we know, keeping the search engines happy is what moves websites up in the SERPs. A Discourse forum combined with the speed and global architecture of a CDN can help supercharge your Discourse instance.
How to complete a Discourse CDN integration
The following steps will walk you through the integration steps of configuring Discourse to work with KeyCDN.
Create a Pull Zone before you start with your Discourse CDN integration.
(Optional) Create a Zone Alias that maps to the Zone URL you just created in step 1. This allows you to use a custom CDN URL such as
discourse-cdn.yourdomain.com
instead ofzonename-hexid.kxcdn.com
.Update the Discourse configuration in the
app.yml
file. Here you must uncomment the CDN line and include your Zone URL or Zone Alias:## the origin pull CDN address for this Discourse instance DISCOURSE_CDN_URL: //discourse-cdn.yourdomain.com
Note: If this line is not within yourapp.yml
file, add it below the other variables.Once the changes are made, the Docker container must be rebuilt. You can rebuild by running the following command:
./launcher rebuild app
Check your site's page source to see if the URLs have been updated to reflect the changes. Your URLs should now be modified to reflect your Zone URL or Zone Alias.