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

Set X-Robots-Tag: noindex for nonlatest rustdoc #2023

Merged
merged 5 commits into from
Feb 4, 2023

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Feb 2, 2023

We want /latest/ URLs to be indexed, but not /1.2.3/ URLs, because the latter compete for pagerank with /latest/ and aren't usually what people want.

This replaces the previous canonical URL header. Canonical URLs were doing some good, but did not work in all cases. In particular, if some older version of a crate's documentation was very different than the latest version, Google would not accept the canonicalization. This would sometimes result in the old version still showing up in the search results instead of /latest/.

Part of #1438

We want /latest/ URLs to be indexed, but not /1.2.3/ URLs, because the
latter compete for pagerank with /latest/ and aren't usually what people
want.

This replaces the previous canonical URL header. Canonical URLs were
doing some good, but did not work in all cases. In particular, if some
older version of a crate's documentation was very different than the
latest version, Google would not accept the canonicalization. This would
sometimes result in the old version still showing up in the search
results instead of /latest/.
@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Feb 2, 2023
@syphar syphar merged commit 2fb8fd3 into rust-lang:master Feb 4, 2023
@github-actions github-actions bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Feb 4, 2023
@syphar syphar removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Feb 4, 2023
@jsha jsha deleted the noindex branch March 14, 2023 19:35
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.

4 participants