Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{%- endif -%}
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
{%- if page.sitemap == false or site.GH_ENV == "gh_pages" %}
{%- if page.sitemap == false or jekyll.environment != 'production' %}
<meta name="robots" content="noindex"/>
{%- endif %}
{%- if jekyll.environment == 'production' and site.google_analytics != '' -%}{%- include analytics/google_analytics.html GOOGLE_ID=site.google_analytics -%}{%- endif -%}
Expand Down
10 changes: 10 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
layout: null
---
{%- if jekyll.environment == 'production' -%}
User-agent: *

# Docker Engine archives
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we have proper redirects, we can probably remove all of these (I think these were added when we were still hosting archives, but they also helped to prevent Google indexing archived URLs it found elsewhere with "new" content, but using the "old" URL - not 100% sure though).

Expand Down Expand Up @@ -26,3 +30,9 @@ Disallow: /ee/
Disallow: /apidocs/v*

Sitemap: https://docs.docker.com/sitemap.xml
{%- else -%}
# Disable all indexing on staging websites and Netlify previews to prevent
# them showing up in search results.
User-agent: *
Disallow: /
{%- endif %}