Skip to content

Commit

Permalink
docs: add noindex, nofollow with X-Robots-Tag on Netlify
Browse files Browse the repository at this point in the history
Apparently, search engines started referencing content from deploy
preview and the Netlify deploy. Since we use GitHub pages to deploy at
the moment, let's ask robots to not index nor follow when building with
Netlify.

Signed-off-by: Mahe Tardy <[email protected]>
  • Loading branch information
mtardy committed Jul 23, 2024
1 parent 0ba2652 commit 358f397
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,14 @@ ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ."

[build.environment]
HUGO_VERSION = "0.126.2"

# Hugo has "enableRobotsTXT" to false on the development environment. Here
# making sure that even the "main" deployment on Netlify (so far available at
# "https://tetragon.netlify.app/"), includes noindex, nofollow. Only the
# deployment on GitHub pages should build with the production environment and
# enable robots.txt.
[[header]]
for = "/"
[headers.values]
X-Robots-Tag = "noindex, nofollow"

0 comments on commit 358f397

Please sign in to comment.