How to use Cloudflare to protect a Discourse site

Hi @Lee_Kris, welcome to the Discourse Meta community!

I am assuming that this is for a self-hosted site. If your site is hosted by Discourse, they have you convered - there shouldn’t be any need to use Cloudflare or a proxy to protect your site.

If you are self-hosting the site, this is probably a question where it would be worth searching for previous questions about this. Cloudflare in particular can cause some issues with Discourse and requires some extra steps to be taken. Here’s a good post about that: Using the CloudFlare template - #2 by Stephen.

Note that that post mentions the need to add cloudflare.template.yml to your Discourse app.yml file. There are some additional details about that here: Full site CDN acceleration for Discourse.

I’d recommend searching on Search results for 'cloudflare' - Discourse Meta to find more discussions about this issue. Feel free to reply to any of those topics, or get back to us here with any questions that you have.

3 Likes