How to redirect HTTP to HTTPS using S3, Cloudfront, and Route 53 using naked domains?

前端 未结 2 1143
难免孤独
难免孤独 2021-02-06 23:27

I have a domain (example.com) with SSL support. I am having an issue when trying to redirect a request from www.example.com -> https://example.com.

2条回答
  •  后悔当初
    2021-02-07 00:15

    You need to have your content being distributed by Cloudfront. So the content from your S3 bucket will go through Cloudfront before being served. You can find info about how to do it here: Using CloudFront with Amazon S3

    Then, for the second part, to have all your data served with https, do the following: Go to CloudFront > Your distribution > behaviour tab > select the first element of the list and click Edit. Then you should be able to see an option for redirecting http to https.

提交回复
热议问题