chore(seo): noindex archived docs versions (/docs/1.XX)#1314
Draft
rberrelleza wants to merge 1 commit into
Draft
chore(seo): noindex archived docs versions (/docs/1.XX)#1314rberrelleza wants to merge 1 commit into
rberrelleza wants to merge 1 commit into
Conversation
Add an X-Robots-Tag: noindex, follow response header for every archived documentation version under /docs/1.XX/ so old versions stop appearing in search results, while the current docs at /docs/... stay indexed. The trailing-splat path covers new versions automatically, so no change is needed when a version is cut each month. We keep the pages crawlable (no robots.txt Disallow) so crawlers can see the header, and use "follow" so link equity still flows to the current docs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Deploy Preview for okteto-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an
X-Robots-Tag: noindex, followresponse header (vianetlify.toml) for every archived documentation version under/docs/1.XX/, so old versions stop showing up in search results.Why
Old versioned docs currently rank and appear in search alongside the current docs, sending people to outdated pages and diluting the canonical docs. Confirmed against production today:
/docs/1.42/returns200with noX-Robots-Tag, i.e. fully indexable.How it behaves
okteto.com/docs/...(current, unversioned) → indexed (untouched)okteto.com/docs/1.XX/...(any archived version) →noindex, followThe rule is a single trailing-splat path (
for = "/docs/1.*"), so every future monthly version is covered automatically, with no per-release edit.Notes / rationale
noindex(not arobots.txt Disallow) is what actually removes pages from the index. We deliberately keep these pages crawlable so crawlers can see the header; aDisallowwould hide the header and leave stale entries in the index.followlets link equity still flow through to the current docs./docs/-prefixed path matches the way Netlify sees requests (verified: the existing/docs/...redirects fire in production)./docs/1.*prefix in Search Console to speed de-indexing.🤖 Generated with Claude Code