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屋!