How do I redirect a naked (apex) domain to www using Route 53?

前端 未结 4 883
甜味超标
甜味超标 2020-12-24 01:23

I need to do a 301 redirect from example.com to www.example.com using Route 53 (and S3 if necessary). There are a few solutions for similar problems but they either do not a

4条回答
  •  伪装坚强ぢ
    2020-12-24 01:42

    If you are using an Application Load Balancer, they added support for redirects. You point your zone apex at your ELB (using an Alias) and have ELB do the redirect to www.example.com

    This seems like a much better solution than setting up a bucket, adding static hosting, redirect, etc.

    https://aws.amazon.com/about-aws/whats-new/2018/07/elastic-load-balancing-announces-support-for-redirects-and-fixed-responses-for-application-load-balancer/

提交回复
热议问题