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

API reference "latest" pages should yield HTTP status 301 not 404 #1435

Open
chalin opened this issue Mar 14, 2023 · 16 comments
Open

API reference "latest" pages should yield HTTP status 301 not 404 #1435

chalin opened this issue Mar 14, 2023 · 16 comments
Labels

Comments

@chalin
Copy link
Contributor

chalin commented Mar 14, 2023

Visit one of the API reference pages and you'll initially get a 404, for example opentelemetry-sdk/latest:

$ curl -I https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-sdk/latest
HTTP/2 404 

If you open the same link in a browser, then the page redirects because it contains JS code that manipulates the window location to refer to the latest version of the appropriate Gem.

Since API reference pages get redirected the proper HTTP status returned should be 301, not 404. Otherwise, that's bad for SEO and for link checkers -- e.g., see https://github.com/open-telemetry/opentelemetry.io/pull/2505/files#r1135889989.

/cc @cartermp @svrnm

@arielvalentin
Copy link
Contributor

I am not sure why it is hosted on github.io since it is available when we publish libraries here: https://www.rubydoc.info/gems/opentelemetry-sdk

@cartermp
Copy link
Contributor

TIL! Let's update the docs site to point there for the API link too

@cartermp
Copy link
Contributor

Submitted open-telemetry/opentelemetry.io#2508

@cartermp
Copy link
Contributor

I think we can consider this closed since we'll use the rubydoc link now.

@chalin
Copy link
Contributor Author

chalin commented Mar 15, 2023

We might have more to discuss, see:

Also, having the same content in two places, isn't a good idea for SEO etc. My guess is that GH pages is used for dev versions of the API reference? If not, and it's the same as rubydoc.info, then maybe it's time to drop the GH pages?

At a minimum, the GH pages should all probably be marked noindex, nofollow, and in addition have an appropriate robots.txt file.

@ahayworth
Copy link
Contributor

The one nice thing that the GH pages version gives us is index page with links to all the docs: https://open-telemetry.github.io/opentelemetry-ruby/

It would be kinda nice to keep that somehow. But otherwise yeah - I don't really see a huge need to keep hosting these on GH pages. Does anyone else even do that?

That said - I'm really not sure exactly how these are getting generated today. I think it's a GitHub integration but because I'm only an approver on this repo, I can't actually see that. Maybe someone like @mwear with more admin privileges can check the settings pages and see if there's a github pages integration installed?

(For what it's worth, the custom code that redirects can be found here on the gh-pages branch)

Copy link
Contributor

github-actions bot commented Mar 9, 2024

👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.

@github-actions github-actions bot added the stale label Mar 9, 2024
@svrnm
Copy link
Member

svrnm commented Mar 11, 2024

is this issue still a thing?

@chalin
Copy link
Contributor Author

chalin commented Mar 12, 2024

Yes it is. The URL in the opening comment still returns 404. I haven't investigated if the same content in two places issue is still relevant.

@github-actions github-actions bot removed the stale label Mar 13, 2024
@svrnm
Copy link
Member

svrnm commented Mar 13, 2024

Yes it is. The URL in the opening comment still returns 404. I haven't investigated if the same content in two places issue is still relevant.

https://www.rubydoc.info/gems/opentelemetry-api
and
https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.2.5/

still look very similar to me, so I guess there are still both places.

@svrnm
Copy link
Member

svrnm commented Mar 13, 2024

The one nice thing that the GH pages version gives us is index page with links to all the docs

We can have some of that on opentelemetry.io I guess:

Copy link
Contributor

👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.

@github-actions github-actions bot added the stale label Apr 13, 2024
@chalin
Copy link
Contributor Author

chalin commented Apr 22, 2024

This is still relevant.

@github-actions github-actions bot removed the stale label Apr 23, 2024
Copy link
Contributor

👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.

@github-actions github-actions bot added the stale label May 23, 2024
@chalin
Copy link
Contributor Author

chalin commented May 28, 2024

This is still relevant.

@chalin
Copy link
Contributor Author

chalin commented May 28, 2024

Can a maintainer add the keep label? /cc @svrnm

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

5 participants