Redirect domain old to new domain automatically

0

How i can assign my old domain to new domain automatically?, can anybody help me please?.

example case : example.com (old) example1.com(new)

My Goal : if someone access web example.com, their will be assign to example1.com automatically.

3 個答案
1

If you are using an application load balancer, host-based routing is recommended.

https://aws.amazon.com/premiumsupport/knowledge-center/elb-configure-host-based-routing-alb/?nc1=h_ls

profile picture
hayao-k
已回答 2 年前
  • Yesterday, I try for change rules on load balancer. And It work like you said, thank you for the hint :).

1

Another method would be to use s3 bucket redirection with Cloudfront, and an ACM certificate.

You need to setup an s3 bucket named "example1.com" (the website that you want to redirect to). to do that, create the bucket => go to properties => scroll all the way down to "static website hosting" => set static site hosting to enabled, hosting type to redirect requests for an object, hostname to "example1.com", protocol to none.

Create an ACM certificate for your domain. go to ACM => request a certificate, put in the FQDN of the website that you want to redirect to (example1.com). you will also need to validate the certificate

Create a cloudfront distribution. enter your origin (This will be the value that you get from s3 as the bucket website endpoint. ex: bucket-name.s3-website-us-west-2.amazonaws.com), change the viewer protocol policy to "Redirect HTTP to HTTPS", give an alternate CNAME record (www.example1.com, example.com), choose your SSL certificate that you created in ACM, create distribution.

Go to your hosted zone in route 53, create an alias A record pointing to the cloudfront distribution that you created.

here are some resources that I find helpful: https://simonecarletti.com/blog/2016/08/redirect-domain-https-amazon-cloudfront/ https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-serve-static-website/

已回答 2 年前
0

A simple Domain CNAME can accomplish this. A set up documentation from GoDaddy here. Respective DNS hosting Orgs/Domain Registrars will provided similar documentation.

https://www.godaddy.com/help/add-a-cname-record-19236

AWS
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南