Skip to content

chore(seo): noindex archived docs versions (/docs/1.XX)#1314

Draft
rberrelleza wants to merge 1 commit into
mainfrom
chore/noindex-old-doc-versions
Draft

chore(seo): noindex archived docs versions (/docs/1.XX)#1314
rberrelleza wants to merge 1 commit into
mainfrom
chore/noindex-old-doc-versions

Conversation

@rberrelleza

Copy link
Copy Markdown
Member

What

Adds an X-Robots-Tag: noindex, follow response header (via netlify.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/ returns 200 with no X-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, follow

The 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 a robots.txt Disallow) is what actually removes pages from the index. We deliberately keep these pages crawlable so crawlers can see the header; a Disallow would hide the header and leave stale entries in the index.
  • follow lets link equity still flow through to the current docs.
  • The /docs/-prefixed path matches the way Netlify sees requests (verified: the existing /docs/... redirects fire in production).
  • Once merged, worth requesting recrawl of the /docs/1.* prefix in Search Console to speed de-indexing.

🤖 Generated with Claude Code

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>
@netlify

netlify Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploy Preview for okteto-docs ready!

Name Link
🔨 Latest commit c698309
🔍 Latest deploy log https://app.netlify.com/projects/okteto-docs/deploys/6a63f364d44f0b000884ea22
😎 Deploy Preview https://deploy-preview-1314--okteto-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant