Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When we have custom domain(s), always redirect to them #342

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aran112000
Copy link
Contributor

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

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
@mnapoli
Copy link
Member

mnapoli commented Jun 20, 2023

Hi Aran, not sure I get this: the API Gateway URL will not invoke the CloudFront function, right?

@aran112000
Copy link
Contributor Author

aran112000 commented Jun 20, 2023

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).

@mnapoli
Copy link
Member

mnapoli commented Jun 20, 2023

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?

@aran112000
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants