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

XenForo CDN Integration

Updated on October 4, 2018

This tutorial shows how to complete a XenForo CDN integration with KeyCDN.

  1. Create a Pull Zone before you start with the XenForo CDN integration.
  2. Navigate to the document root of your XenForo installation. We recommend to use your FTP account.
  3. Add the following code to the file library/config.php using your own CDN URL such as

    $config['externalDataUrl'] = '';
    $config['javaScriptUrl'] = '';
  4. Log in to your XenForo control panel and navigate to “Appearance” → “Styles” → [Your Style] → “Style Property Groups” → “General” → “Settings.”

  5. In the field “Path to Images” replace default “styles/default” with “” and click on the “Update Style Properties” button to apply your new settings.

  6. Up one directory, navigate to “Header and Navigation” → “Settings.”

  7. Confirm that the “Header Logo Image Path” is using the @imagePath command. If you hard code the complete URL your logo will not serve correctly from the CDN.

That’s it. Check the HTML in order to make sure the URLs have been rewritten properly.

Important: When using avatars in Xenforo, the feature Ignore Query String needs to be disabled. It’s recommended to purge the whole Zone after this Zone change.

Also make sure to check out our additional recommendations on how to speed up Xenforo.

Supercharge your content delivery 🚀

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

Get started