Discourse CDN Integration Guide

discourse cdn

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 Zonealias 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 discourse-1.kxcdn.com for example.
  3. Update the Discourse configuration in the app.yml file. Here you must uncomment the CDN line and include your Custom CDN url or zone url such as:
    ## 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 url’s have been updated to reflect the changes. Your urls should now be modified to reflect your zone url or Custom CDN url.discourse-cdn-integration

Leave A Comment?