Skip to content

Old Rust docs still appear in search results #14111

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

Closed
ericsampson opened this issue May 11, 2014 · 1 comment
Closed

Old Rust docs still appear in search results #14111

ericsampson opened this issue May 11, 2014 · 1 comment

Comments

@ericsampson
Copy link

In #9955, @brson added a robots.txt file (thanks!) to prevent search engines crawling non-current docs. However, I just noticed that this doesn't really address the issue - I used Google to search for 'Rust pointers', and the third result was static.rust-lang.org/doc/0.6/tutorial-borrowed-ptr.html , although the robots.txt did stop Google from providing a description of the result ;)

Apparently robots.txt will stop Google/etc from crawling a file, but not from indexing a file if anyone on the internet has linked to it:
https://support.google.com/webmasters/answer/156449?hl=en
Not sure what web server rust-lang runs on, but e.g. in Apache you can use .htaccess to write a X-Robots-Tag header to set noindex/nofollow on entire directories, instead of having to add it in the header of each page:
http://perishablepress.com/taking-advantage-of-the-x-robots-tag/
One note is that to make this approach work, I believe you have to not block crawling using robots.txt, or else the crawlers will never notice the X-Robots-Tag :)

Thanks!

@alexcrichton
Copy link
Member

I've configured docs older than 0.10 to have X-Robots-Tag: noindex on the new doc.rust-lang.org domain.

bors added a commit to rust-lang-ci/rust that referenced this issue Feb 13, 2023
…ing, r=Veykril

fix: Hide proc macro server version detection errors

These are harmless, but users tend to blame other things on them.
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

No branches or pull requests

2 participants