Amazon S3 and Cloudflare SSL

I’ve set up static website hosting on S3 (using the S3 option) and added a CNAME DNS entry for the bucket (it’s a subdomain under our main domain). All that works fine, however I cannot get SSL working: I always get “NET::ERR_CERT_COMMON_NAME_INVALID” (this is on Chrome). The domain has full SSL activated.

What I’ve tried so far:

  1. Make a custom page rule and set SSL to ‘Flexible’ (even if that worked it’s not a good option).
  2. Create a AWS CloudFront distribution and add an origin certificate to it. Then changed the CNAME to alias the CloudFront distribution.
  3. Instead of using the S3 static website hosting option, I’ve set up a CNAME record following the support article here: https://support.cloudflare.com/hc/en-us/articles/360020991331

I can’t really find anything helpful on the internet (most guides are just setting everything up with AWS services).

Whats the domain in the first place?

The Cloudflare cert only covers *.yourdomain.com, it can’t cover *.*.yourdomain com

You either need it to just be a single level subdomain or purchase a dedicated certificate where you can specify that subdomain (unless you are on a business or enterprise plan).

This topic was automatically closed after 30 days. New replies are no longer allowed.