I have a static webpage on AWS S3 with Cloudfront. Cloudfront is setup with ACM (AWS Certificate Manager) and am using Route 53 with it. How can I have both the www.my-endpoint.com
and my-endpoint.com
endpoints secure with https
?
Here are some details:
my-endpoint.com
and is attached to the Cloudfront distributionmy-endpoint.com
whose alias points to Cloudfrontwww.my-endpoint.com
is configured so its alias is my-endpoint.com
When I navigate to https://www.my-endpoint.com
chrome complains of a potential security risk whereas the https://my-endpoint.com
is fine.
Create a new ACM request for your-domain.com
and www.your-domain.com
(and better yet, *.your-domain.com
).
Use the newly created certificate (after verification) on your CloudFront instance.
The redirection from https://www.domain.com
to https://domain.com
will work after you have a valid certificate for both domains.