Skip to content

Commit 66a1974

Browse files
authored
Rollup merge of #69992 - kornelski:robots, r=steveklabnik
Block version-specific docs from search engines Latest stable, beta and nightly URLs remain accessible because their URLs don't start with a version number. Robots.txt uses simple path prefixes, so it's OK that the disallow rules aren't full directory paths. Direct links to old docs remain accessible to users, because robots.txt only affects crawlers. With this change old docs for specific old versions of Rust won't pop up in search results. This is good, because users won't be getting obsolete documentation by accident.
2 parents dd5c112 + a5a786d commit 66a1974

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

src/doc/robots.txt

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
User-agent: *
2-
Disallow: /0.3/
3-
Disallow: /0.4/
4-
Disallow: /0.5/
5-
Disallow: /0.6/
6-
Disallow: /0.7/
7-
Disallow: /0.8/
8-
Disallow: /0.9/
9-
Disallow: /0.10/
10-
Disallow: /0.11.0/
11-
Disallow: /0.12.0/
12-
Disallow: /1.0.0-alpha/
13-
Disallow: /1.0.0-alpha.2/
14-
Disallow: /1.0.0-beta/
15-
Disallow: /1.0.0-beta.2/
16-
Disallow: /1.0.0-beta.3/
17-
Disallow: /1.0.0-beta.4/
18-
Disallow: /1.0.0-beta.5/
2+
Disallow: /1.
3+
Disallow: /0.
194
Disallow: /book/first-edition/
205
Disallow: /book/second-edition/
216
Disallow: /stable/book/first-edition/

0 commit comments

Comments
 (0)