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