18/02/2025
AWS - Route 53 - Redirect to another domain (HTTPS)
Want to send your traffic to another domain? A relatively simple procedure in most cases… except in AWS using Route53.
Step 1
Certificate Manager
First step, define the region on “US East (N. Virginia)us-east-1”
Next, click on “Request a certificate”, select “Request a public certificate” and click on “Request a certificate” again.
Here you have to define the name of the original domain.
You also can use a wildcard to have a certificate that covers your entire domain (*.mywebsite1.com)
Then click on Next.
Here you can choose between validation by DNS or by e-mail, the easiest if you use Route53 is validation by DNS.
then, just follow the instructions, the process is very simple.
Step 2
CloudFront
Go to the CloudFront service and create a new distribution.
You will need to change some configurations
Origin Domain Name
Indicate the url where you want to redirect your visitors
In this example, anotherwebsite.com
Viewer Protocol Policy
Set this value to “Redirect HTTP to HTTPS
Alternate Domain Names (CNAMEs)
Here you have to define the domain of origin, in our case “mywebsite1.com”.
SSL Certificate
Select, “Custom SSL Certificate” and choose the certificate created before
And finally, click on “Create distribution”.
Step 3 (and the last one…)
Route53
Now that the whole system is set up, all we need to do is tell Route53 where to send the traffic.
So, go to Route53 and select your hosted zone.
and click on “Create a record”.
Record Type
Choose type A
Route traffic To
Enable alias usage, and select “Alias to CloudFront distribution”.
Then you can select your CloudFront link.
and… Tadaaaa!
After a few minutes, you will be able to access your domain and be redirected to your other domain without any worries, and all in HTTPS!