# Enable a CDN for your Discourse

**URL:** https://meta.discourse.org/t/enable-a-cdn-for-your-discourse/14857
**Category:** Self-Hosting
**Tags:** cdn, configuring, how-to
**Created:** [April 18, 2014, 7:51am UTC](https://meta.discourse.org/t/enable-a-cdn-for-your-discourse/14857 "2014-04-18T07:51:41Z")
**Posts on this page:** 1
**Showing post:** 84

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [June 26, 2021, 6:23am UTC](https://meta.discourse.org/t/enable-a-cdn-for-your-discourse/14857/84 "2021-06-26T06:23:15Z")

</div>

Yes, we use it that way and it works well. Just be very careful to disable any javascript optimizations. You can see our setup here:

> [@S3 image bandwidth costs are getting annoying](https://meta.discourse.org/t/s3-image-bandwidth-costs-are-getting-annoying/122052/4):
>
> I’m using Cloudflare on [my Discourse site](https://blenderartists.org) and it works fine. You basically route all your traffic through Cloudflare and tell it what to process or cache and that’s it. There are a few things to keep in mind though: Configure Cloudflare to NOT cache anything (set up exceptions using page rules, see below). Don’t let Cloudflare touch your Javascript - specifically, turn off Rocket Loader. I’m not sure about Brotli compression yet, I disabled it. Set up page rules to cache the avatar and upload …

---

_[View the full topic](https://meta.discourse.org/t/enable-a-cdn-for-your-discourse/14857)._
