大网数据广告活动
服务器运维问答

HTTPS Only vs Redirect to HTTPS

· 52CE 我爱测

When configuring AWS CloudFront (or Load Balancer) I have the option to choose to Redirect all HTTP requests to HTTPS or use HTTPS Only option. My website works only with HTTPs, so I don't want any HTTP communication. What differ…

问题原文

原帖链接 · Hooman Bahreini · CC BY-SA 4.0

When configuring AWS CloudFront (or Load Balancer) I have the option to choose to Redirect all HTTP requests to HTTPS or use HTTPS Only option.

My website works only with HTTPs, so I don't want any HTTP communication.

What difference does these options make to my configuration?

已采纳解答

原帖链接 · ceejayoz · CC BY-SA 4.0

"HTTPS Only" means if someone goes to http://foo.cloudfront.net/, they'll get an error.

"Redirect all HTTP requests to HTTPS" means they'll get redirected from http://foo.cloudfront.net/ to https://foo.cloudfront.net/.

"HTTPS Only" is fine for a CloudFront URL your users wouldn't type (like for an images CDN, or proxied in front of an API), but if you're using it to host the user-facing URLs, you want the redirects so someone who types your www.example.com still winds up on the site.

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

资料来源与适用范围

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

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

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