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

redirect kita.js.org to kitajs.org #9150

Closed
arthurfiorette opened this issue Jul 23, 2024 · 11 comments
Closed

redirect kita.js.org to kitajs.org #9150

arthurfiorette opened this issue Jul 23, 2024 · 11 comments
Labels

Comments

@arthurfiorette
Copy link
Contributor

arthurfiorette commented Jul 23, 2024

Hello, in #8455 I added the kita.js.org domain, but now we're using kitajs.org as an official domain. What should I do to redirect everything to the new domain, would love urls like kita.js.org/a/b/c/d would flawlessly redirect to kitajs.org/a/b/c/d so all existing urls don't break.

@indus
Copy link
Member

indus commented Jul 24, 2024

I can add a Redirect via a Page Rule if you like. But only for a year or so (Page Rules are limited)

@indus
Copy link
Member

indus commented Jul 24, 2024

You also should file a PR that removes the CNAME from the list.

@indus indus added the question label Jul 24, 2024
@MattIPv4
Copy link
Member

👀 an automatic redirect is going to get flagged by the cleanup automation. I would encourage doing what we always do for these and having a catch-all landing page for lost users like vue.js.org

@indus
Copy link
Member

indus commented Jul 24, 2024

@MattIPv4 You mean like https://vue.js.org/. I'm not sure how to make it catch-all (from the requesters side).

The cleanup automation would only work on the present subdomains in the list. f it is removed it would not complain I would guess.

@arthurfiorette
Copy link
Contributor Author

I can add a Redirect via a Page Rule if you like. But only for a year or so (Page Rules are limited)

Would be awesome if we could setup something like that.

I would encourage doing what we always do for these and having a catch-all landing page for lost users like vue.js.org

However all links posted from aug 2023 until now would break, this includes hardcoded links and assets urls that would break because they aren't from a end-user direct click.

@MattIPv4
Copy link
Member

I'm not sure how to make it catch-all (from the requesters side).

If it's on GitHub Pages, you can just do a 404.html that will act as a catch-all.

If we think a page rule is the right option here, I'm not against it, it just feels a bit odd to me as normally we do not allow automatic redirects at all, and there isn't really a documented way in the repo for us to track what page rules exist.

@indus
Copy link
Member

indus commented Jul 24, 2024

I think @MattIPv4 is right. I mean we already have one such redirect from this: #8079 (comment). That helped us to solve a very messy situation. But it is not in our interest to make this a general offer of this service and to take care for broken links after dropping a JS.ORG subdomain.

As a side-effect the new URL will be spread much faster I would guess. I think a 404.html with a notice "We moved " (and if needed with a "redirect in 5-4-3-2-1-0") is the way to go here.

@arthurfiorette
Copy link
Contributor Author

Could this technically be done if I change the cname to point to the new domain?

- "kita": "kitajs.github.io/docs",
+ "kita": "kitajs.org",

If it's on GitHub Pages, you can just do a 404.html that will act as a catch-all.

Yeah but that does not works for non html pages. for example, kita.js.org/logo.png won't work.

@indus
Copy link
Member

indus commented Jul 25, 2024

May work technically but wouldn't work for JS.ORG. "cleanup automation" and our policy of "no redirects" would come in conflict.

The 404.html was not meant to redirect assets but to give your visitors a hint that you have moved...

@arthurfiorette
Copy link
Contributor Author

I ended up creating the following repo:

https://github.com/kitajs/kita.js.org

Maybe this should be documented in case future users ask for the same thing.

I will probably just create a CF worker to return a 308 status code and update the CNAME here to point to that worker once I have more time.

@indus
Copy link
Member

indus commented Jul 27, 2024

@arthurfiorette This will trigger a notice in the yearly cleanup (as we wouldn't handout a subdomain for this in the first place).

@indus indus closed this as completed Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants