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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠