Repository navigation
Add noindex header to versioned docs subdomains - #2087
Merged
Merged
Conversation
Contributor
This comment has been minimized.
This comment has been minimized.
Old docs versions on X.Y.sourcegraph.com are indexed by Google. Send X-Robots-Tag: noindex on those hosts. sourcegraph.com/docs is not affected.
taras-yemets
force-pushed
the
taras/noindex-version-subdomains
branch
from
October 12, 2026 10:19
5d12bbe to
23b8e3b
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Matches the noindex, nofollow meta tag on 5.2–6.1.
BolajiOlajide
approved these changes
Oct 12, 2026
Member
|
Thank you! |
This branch was successfully deployed
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.
Google indexes old docs versions, such as
6.5.sourcegraph.com/deep-search(reported in Slack). These pages outranksourcegraph.com/docsfor "deep search". They have a canonical link tosourcegraph.com/docs, but Google treats a canonical as a hint, not a rule.This PR sends
X-Robots-Tag: noindex, nofollowon hosts like6.5.sourcegraph.com. It does not affectsourcegraph.com/docs.Why it happened
Each version branch in
sourcegraph/docs-legacy-versionsis a copy ofmain.mainhas no noindex rule for versioned subdomains. So each version only has what was added to it by hand, or whatmainhad when the branch was cut:noindex, nofollowmeta tag, added to these branches onlyDisallow: /from #1480Allow: /since #1718, no noindexPlan
mainlater get the header.v6_2–v7_7insourcegraph/docs-legacy-versions. Onv6_11,v6_12andv7_0, also change robots.txt toAllow: /, so Google can see the header.X-Robots-Tag: noindex, nofollow.Test plan
6.5.sourcegraph.comand6.12.sourcegraph.com. It does not matchsourcegraph.com,www.sourcegraph.com, or*.vercel.app(checked in Node).sourcegraph.com/docshas noX-Robots-Tagheader.