Open aran112000 opened 1 year ago
Hi Aran, not sure I get this: the API Gateway URL will not invoke the CloudFront function, right?
Sorry, to explain more clearly, when we deploy a website with a custom domain, we end up with URLs for:
This PR would allow this option to redirect ALL hosts to the configured primary domain.
Without this, if a search engine managed to crawl these URLs, all of these versions would show the same content unless handled within the application logic (easy to forget and end up with nasty SEO implications as a result).
Ahh ok, I guess this would work for the cloudfront.net URL. But I meant it won't work for the API Gateway URL, right?
I was looking to solve Cloudfront initially and just thought (wrongly) this would just work with APIGW too, but of course not now I think through it properly.
This ensures API Gateway and Cloudfront URLs all redirect to the primary domain - this helps prevent duplicating sites and getting them indexed across multiple hosts accidentally