适用于Route53的AWS S3重定向不适用于HTTPS [英] AWS S3 Redirect for Route53 not working for HTTPS
问题描述
我正在尝试使用AWS S3静态网站重定向来允许从Apex域(example.com)重定向到]
因此,您需要在 example.com
s3存储桶的前面添加CloudFront并配置指向它的正确DNS记录
I am attempting to use AWS S3 Static Website Redirect to allow redirects from an Apex domain (example.com) to the www.example.com domain.
I used the following guide https://medium.com/faun/redirect-naked-domain-to-www-with-https-on-aws-route-53-e620e4ce989d
In Route53, I have created an A record for the apex domain example.com
example.com A Simple s3-website-eu-west-1.amazonaws.com.
The www.example.domain
points to a cloudfront distribution which distributes my website.
The cloudfront domain will redirect all HTTP traffic to HTTPS
www.example.com A Simple *************.cloudfront.net.
In S3, I have created a bucket for example.com
and set it up to redirect all requests
[
The bucket is public and empty
The resulting behavior works for HTTP but times out for HTTPS
http://example.com -> https://www.example.com
https://example.com -> ETIMEDOUT
http://www.example.com -> https://www.example.com
https://www.example.com -> https://www.example.com
How can I fix this setup so that
https://example.com -> https://www.example.com
The issue is S3 static website hosting doesn't support HTTPS. [ref]
So you need to add a CloudFront in front of example.com
s3 bucket and configure proper DNS records pointing to it
这篇关于适用于Route53的AWS S3重定向不适用于HTTPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!