content/robots.txt.erb (19 lines of code) (raw):
---
is_hidden: true
---
<% if production_and_default_branch? %>
# If on default branch and production env
sitemap: https://docs.gitlab.com/sitemap.xml
user-agent: *
disallow: /ce/
disallow: /debug/
disallow: /frontend/default/badges.js
<% elsif stable_version?(current_branch) %>
# If on stables branches
sitemap: https://docs.gitlab.com/<%= current_branch %>/sitemap.xml
user-agent: *
<% else %>
# Ban all spiders from the entire site when not on default or stable branches
user-agent: *
disallow: /
<% end %>