Setting up Cloudfront as a reverse proxy for domain redirection

I will try it and report back! thanks for help

you’re welcome, let me know if you need anything else :slightly_smiling_face:

A simple cname from http://www.ours.com|www.ours.com to http://www.theirs.com|www.theirs.com does not work. Comes back with a 404 despite http://www.theirs.com|www.theirs.com being up.

dig correctly showing

<http://www.ours.com|www.ours.com>.	43	IN	CNAME	www.tehirs.com.```

I think you would need some cooperation from their side if you want to find a permanent optimal solution. But great to know that this is an issue.

Ye just trying to understand what i need to go back to them with. I have my own website i can use to test which is hosted on alb. I get the same 404. Guess just trying to understand why that is before i can go back to them with something

So using our dummy website hosted on alb. I had to add a listener to points http://www.ours.com|www.ours.com to the same target group as the dummy website and now http://www.ours.com|www.ours.com goes to our dummy website but the certificate is not correct

but the certificate on http://www.ours.com|www.ours.com is not going to be valid as http://www.dummywebsite.com|www.dummywebsite.com and the alb associated with it is using a different certificate.

Asking the third party to ensure that the listener is added for http://www.ours.com|www.ours.com on their web server will result in the same certificate issue

and a simple cname http://www.ours.com|www.ours.com to http://www.oursdummy.com|www.oursdummy.com did not work without adding the listener in the alb which exposes http://www.oursdummy.com|www.oursdummy.com

1. Route53 cname record <http://www.ours.com|www.ours.com> to www.theirs.com.

This will not work because certficiate obviously shows that it is invalid, http://ours.com|ours.com pretending to be http://theirs.com|theirs.com

I have to go back to the previous cloudfront setup i had using an A record Alias.

I am sorry to hear that. May I ask what stack is the website build in and infrastructure operated? Is it also AWS or an Nginx/PHP type of a stack?

We are on AWS, the third party is using a wordpress framework

I see, in that case, they can probably simply adjust the Nginx/Apache configuration to support your CNAME type of record. Also, Using a Let’s Encrypt certificate can support multiple domains so regenerating it with http://newebsite.com|newebsite.com and http://www.newebriste.com|www.newebriste.com and http://theirs.com|theirs.com is very simple. This is good for getting it work. For a long term solution I would avoid the http://theirs.com|theirs.com from the certificate and also from their DNS to avoid SEO duplicity issues as we mentioned before.