大网数据广告活动
网站运营与故障问答

ERR_TIMED_OUT when accessing S3 bucket by a custom domain that uses Route53

· 52CE 我爱测

I have set up a static website by following this walkthrough: https://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html I can see the website by accessing its bucket address ( example.ca.s3-we…

问题原文

原帖链接 · Ali Alavi · CC BY-SA 4.0

I have set up a static website by following this walkthrough:

https://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html

I can see the website by accessing its bucket address (example.ca.s3-website-us-east-1.amazonaws.com). But when I try to access the website using my domain address (example.ca), it gives me ERR_TIMED_OUT. I have purchased my domain from dreamhost, and had already changed the nameservers to those nameservers shown by Route53. I did a whois query of my domain and it just confirms that the nameservers are set properly. I am wondering what the issue can be, and how I can resolve it. I have checked the NS and A records in Route53 multiple times, and they follow the instruction. Can the issue be due to my domain being a .ca one?

已采纳解答

原帖链接 · Maximillian Laumeister · CC BY-SA 4.0

It turned out that HSTS headers were being served by the previous hosting. HSTS set all HTTP requests to example.ca to be internally redirected to HTTPS before being sent.

Because custom domain HTTPS was not yet configured for the S3 bucket, the HTTPS request was timing out. Note that S3 does not support custom domain HTTPS directly, only through CloudFront.

The solution to this while in development is to clear the browser's HSTS cache for example.ca in settings. However when the new website is published, it will need to be served over HTTPS so that visitors who have HSTS already cached in their browsers are still able to load the site. The only solution to this is to use CloudFront or another reverse proxy / CDN (such as CloudFlare) to manage the custom domain HTTPS certificate.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2018-10-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。