What's the best practice for changing domains?

0

I currently have “current-domain.com” configured on my EC2 using Route53. What are the best practices for changing this domain to “new-domain.com” without downtime for the web site?

  1. Can I set “current-domain.com” and “new-domain.com” to an A record pointing to the same Elastic IP address?

  2. When setting “new-domain.com” to https, is it better to set the SSL certificate issued by ACM to the ELB?

  3. When and how should I set up the redirect from “current-domain.com” to “new-domain.com”?

Thank you in advance for your cooperation.

1 Answer
2
Accepted Answer

Hello.

  1. Can I set “current-domain.com” and “new-domain.com” to an A record pointing to the same Elastic IP address?

Yes, you can create an A record with the same Elasitc IP address.
In this case, whether you access “current-domain.com” or “new-domain.com”, you will access the same EC2.

When setting “new-domain.com” to https, is it better to set the SSL certificate issued by ACM to the ELB?

Setting up HTTPS with ALB and ACM is easy, so if you can tolerate the cost of ALB, I think you can use it.
I also think that having an ALB will be useful when dealing with security issues in the future as it will also allow you to configure AWS WAF.
https://aws.amazon.com/waf/?nc1=h_ls

When and how should I set up the redirect from “current-domain.com” to “new-domain.com”?

If you have set up an ALB, you can redirect with the settings in the document below.
The timing to set this is after creating a new domain A record.
https://repost.aws/knowledge-center/elb-redirect-to-another-domain-with-alb

If you want to control it on the web server side, I think the following blog will be helpful.
https://www.digitalocean.com/community/tutorials/how-to-create-temporary-and-permanent-redirects-with-apache-and-nginx

profile picture
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago
profile pictureAWS
EXPERT
reviewed 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions