From ffa29e286269a21e0943443626118d115646179a Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Thu, 10 Jun 2021 17:00:30 -0700 Subject: [PATCH] Tell Google not to index the non-versioned docs --- layouts/robots.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/layouts/robots.txt b/layouts/robots.txt index 769d069a8d7..449f2c85a6b 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,4 +1,12 @@ User-agent: * -Disallow: {{ if ne (getenv "HUGO_ENV") "production" }}/{{ end }} +{{ if ne (getenv "HUGO_ENV") "production" }} +Disallow: / +{{ end }} + +{{ range .Pages }} +{{ if in .Dir "rancher/v2.x" }} +Disallow: {{ .RelPermalink }} +{{end}} +{{ end }} Sitemap: https://rancher.com/sitemap.xml