By using AWS re:Post, you agree to the Terms of Use

Questions tagged with Website Hosting

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Cloudfront Multiple Distributions Automatic Directs

Hello, I have a question, I have 2 cloudfront distributions with 2 different certificates / domains that point to the same S3 Bucket # main distribution is 123456789.cloudfront.net, with alternate domain + certificate: main.mydomain.com # second distribution is 987654321.cloudfront.net, with alternate domain + certificate: sub1.otherdomain.com On DNS (I use cloudflare) I have a CNAME for the main distribution domain: # main.mydomain.com cname to 123456789.cloudfront.net and I add other subdomains pointing to this other CNAME (for better management as I have many subdomains): # sub1.mydomain.com cname to main.mydomain.com but I also do point subdomain from the other domain to this (again because of management and some hardcoded links, **so I can't point it to it's own distribution**): # sub1.otherdomain.com cname to main.mydomain.com On theory I would need to use **cloudfront function to redirect the sub1.otherdomain.com to it's distribution (987654321.cloudfront.net)**, but it works without it and I don't know why (it shouldn't or there is some universal property of cloudfront I'm not aware about), because **there is no pointing / redirect from first distribution to the second one** configured, the **only DNS pointing to cloudfront is from main.mydomain.com** (cname to 123456789.cloudfront.net), and the **certificates are different**. Is it expected? Need to be sure for not having headaches on the future with production stuff.
1
answers
0
votes
177
views
asked 9 months ago