Setting up HTTPS in Cloudflare and Amazon S3 for your Craft CMS site
Tommy Marshall, Former Front-End Developer
There's a misconception that adding HTTPS to your site and serving Amazon S3 files from the same domain is difficult. To be honest, before I dove into this more, I thought it was too. In reality, there's only a few moving parts and even fewer gotchas. You don't have to pay Amazon $600/month for a custom URL. You don't even need an SSL certificate installed on your server anymore. And it's free.
So how does all this work? In this 8ish minute screencast below I'll walk through:
- Signing into Amazon Web Services for the first time
- Setting your nameservers and configuring Cloudflare
- Configuring uploads within CraftCMS
- Creating a page rule within Cloudflare to enable HTTPS
- Updating those long Amazon S3 uploads paths http://s3-us-west-2.amazonaws.... to a clean, secure, https://files.yourdomain.com.