Search code examples
amazon-web-servicesamazon-cloudfrontamazon-route53

Route53 is changing my Cloudfront site to "not secure"


The entirety of my web application is contained within various AWS services and is working properly with Cloudfront.

When I go to abcxxxx.cloudfront.net my site works as expected and is secured with https.

When I try and use my own custom domain with Route53 and setting www.mywebsite.com and mywebsite.com as aliases, it is no longer secure.

My alias target for each is the proper Cloudfront domain.

I don't know if the following has to do with my problem but when I try to go to mywebsite.com it says:

"this site cannot be reached"

but when I go to www.mywebsite.com it redirects to https with the "https" crossed out in red and displays "not secure".

Cloudfront also has the proper CNAMES.

How do I properly configure Route53 to work like my Cloudfront domain?


Solution

  • Mark B answered the question. Don't use Cloudfront's default SSL Certificate. Go to Certificate Manager and request a new one and use that one in Cloudfront. My site then worked exactly as expected