Support

Find answers, guides, and tutorials to supercharge your content delivery.

Discourse CDN Integration

Updated on October 4, 2018
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.

  1. Create a Pull Zone before you start with your Discourse CDN integration.

  2. (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 of zonename-hexid.kxcdn.com.

  3. 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 your app.yml file, add it below the other variables.
  4. Once the changes are made, the Docker container must be rebuilt. You can rebuild by running the following command:

    ./launcher rebuild app
    
  5. 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.

Supercharge your content delivery 🚀

Try KeyCDN with a free 14 day trial, no credit card required.

Get started
KeyCDN uses cookies to make its website easier to use. Learn more