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

Add rel="nofollow" on Versions links #1850

Merged
merged 1 commit into from
Sep 21, 2022
Merged

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Sep 19, 2022

Part of #1438. This avoids having search engines was time fetching versioned links which are just going to be canonical'ed away.

@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Sep 19, 2022
@syphar
Copy link
Member

syphar commented Sep 20, 2022

personally I would be fine with this, before I dig into testing & review I would like to have a last approval by @jyn514 and @Nemo157 , though I remember at least @jyn514 was already fine with this once.

@jyn514
Copy link
Member

jyn514 commented Sep 20, 2022

This seems fine, yeah, not sure of any downsides here other than the old versions not showing up in Google. People can always use our version selector if they want a specific version.

@syphar
Copy link
Member

syphar commented Sep 20, 2022

@jsha

@jsha
Copy link
Contributor Author

jsha commented Sep 20, 2022

will this be enough for google or should we also set meta/no-index on these pages?

I don't want to noindex the explicitly-versioned pages because it's possible there's some item name that only exists in old versions. In that case, the old pages won't be canonicalized away (because their <link rel="canonical"> points to a 404), and may still be findable via search engines.

Of course, those search engines would still have to find that old page, which this PR would make harder since we are encouraging them not to crawl explicitly versioned URLs, by removing some links to those URLs. However, other links may still exist on the web, and search engines may still discover old URLs that way. I realize this is a bit hand-wavy but it seems like the right balance to me at the moment. :-)

this will still be incomplete, right?

I think it's complete. This is a macro (macro releases_list) that is used (in my local checkout) in the topbar and in the crate details page.

@syphar
Copy link
Member

syphar commented Sep 21, 2022

will this be enough for google or should we also set meta/no-index on these pages?

I don't want to noindex the explicitly-versioned pages because it's possible there's some item name that only exists in old versions. In that case, the old pages won't be canonicalized away (because their <link rel="canonical"> points to a 404), and may still be findable via search engines.

Of course, those search engines would still have to find that old page, which this PR would make harder since we are encouraging them not to crawl explicitly versioned URLs, by removing some links to those URLs. However, other links may still exist on the web, and search engines may still discover old URLs that way. I realize this is a bit hand-wavy but it seems like the right balance to me at the moment. :-)

kk, understood.

this will still be incomplete, right?

I think it's complete. This is a macro (macro releases_list) that is used (in my local checkout) in the topbar and in the crate details page.

I won't include the list of dependencies, which also can (indirectly) point to old versions of crates.

But assuming we don't want to block everything for google, but only some old versions, I'm fine with this.

@syphar syphar merged commit b42ffe9 into rust-lang:master Sep 21, 2022
@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 Sep 21, 2022
@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 Sep 21, 2022
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.

None yet

3 participants