Search code examples
amazon-web-servicesamazon-s3amazon-elastic-beanstalkamazon-cloudfrontamazon-route53

How to redirect naked urls to www over https in AWS?


I have set up redirects from these below URLs:

http://tweepsbook.com
http://www.tweepsbook.com

to

https://www.tweepsbook.com

But I am facing issues with redirecting https://tweepsbook.com to https://www.tweepsbook.com I have an SSL certificate for both domains.

Currently, S3 allows redirects via HTTP only. I want redirects for HTTPS as well

I am currently using AWS S3 bucket, Elastic Beanstalk, ACM, Route 53.


Solution

  • If you are using an Application Load Balancer with your Elastic Beanstalk application, you can use a combination of these two features to redirect the root domain to www, and redirect HTTP to HTTPS.