I am using route 53 for a domain (example.com) linked to my app on Heroku. To handle naked domain redirection, I am using a S3 bucket as explained here: https://aws.amazon.com/blogs/aws/root-domain-website-hosting-for-amazon-s3/
As S3 doesn’t support SSL ( https:// example.com was not accessible), I set up a Cloudfront distribution (d2123.cloudfront.net) and a custom SSL (with SNI) linked to my S3 bucket as explained here:
http://stackoverflow.com/a/30495934/1479849
I entered example.com in the field "CNAME alternate domain"
When I visit my cloud front distribution using https, I get redirected to my website at www.example.com, which tells me that my configuration is correct.
I am having a problem at the last step, when I set up route 53 to link example.com to my Cloudfront distribution. I created an ALIAS (from example.com to my Cloudfront) and https://example.com is redirected to https://www.example.com (Yay!) but http://example.com/* returns a Cloudfront Error
Anybody knows how to set route53 to have an ALIAS to a Cloudfront distribution linked to an S3 handling redirection?
https://example.com
tohttps://www.example.com
. S3 introduced the redirect capability, and Route 53 alias integrates to S3 and CloudFront for exactly this purpose.