I have looked at documentation on how I can redirect my traffic from one domain to another in AWS but to no avail I am unable to. The way I see the process using AWS is like so:
Route 53 ----> S3 ----> CloudFront ----> ALB ---> CloudFront?
What I have done are the following:
monkey.com
's CloudFront ID 444fasdfdd.cloudfront.net
to point to the CloudFront ID 3dfdsafds3.cloudfront.net
of ape.com
.www.monkey.com
and monkey.com
to ape.com
ape.com
.monkey.com
's CloudFront Distribution. I want to change the "Alternate Domain Name (CNAME)" of www.monkey.com
and monkey.com
to www.ape.com
and ape.com
and replace the Custom SSL certificate of *.monkey.com
with *.ape.com
; however, I receive an error saying I already have a Distribution of ape.com
(which is true).I hope I made myself clear on the issue I am having. If you want me to clear up any confusion please let me know.
If you edited Route 53 A record for monkey.com
to the CloudFront of ape.com
, you are using ape.com
as the backend, but the URL in the viewer's browser will still show as monkey.com
.
Instead, what you need to do is keep Route 53 monkey.com
and point it to a dummy website whose only purpose is to return a redirection to the new domain. You can use S3 website for this, or any other web hosting for that matter. Example of using S3 for redirection.