From 23b8e3b5c46d39f22333fa9df578fd4737a09935 Mon Sep 17 00:00:00 2001 From: Taras Yemets Date: Mon, 12 Oct 2026 10:15:32 +0000 Subject: [PATCH 1/2] Add noindex header to versioned docs subdomains 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. --- cspell-allow-list.txt | 1 + vercel.json | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cspell-allow-list.txt b/cspell-allow-list.txt index 4fdce36b5..a10f16fac 100644 --- a/cspell-allow-list.txt +++ b/cspell-allow-list.txt @@ -355,6 +355,7 @@ nodeport noeviction nofail noheadings +noindex nonexistenturl nonprivileged noout diff --git a/vercel.json b/vercel.json index e47d609c2..b5b5388f6 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,14 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", "fluid": true, - "ignoreCommand": "sh dev/vercel-ignore-build.sh" + "ignoreCommand": "sh dev/vercel-ignore-build.sh", + "headers": [ + { + "source": "/(.*)", + "has": [ + {"type": "host", "value": "^\\d+\\.\\d+\\.sourcegraph\\.com$"} + ], + "headers": [{"key": "X-Robots-Tag", "value": "noindex"}] + } + ] } From 41b0da5a123518c54065151c3965096a5cdb5bd2 Mon Sep 17 00:00:00 2001 From: Taras Yemets Date: Mon, 12 Oct 2026 10:29:26 +0000 Subject: [PATCH 2/2] Add nofollow to the versioned subdomains header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Matches the noindex, nofollow meta tag on 5.2–6.1. --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index b5b5388f6..f5c404f23 100644 --- a/vercel.json +++ b/vercel.json @@ -8,7 +8,7 @@ "has": [ {"type": "host", "value": "^\\d+\\.\\d+\\.sourcegraph\\.com$"} ], - "headers": [{"key": "X-Robots-Tag", "value": "noindex"}] + "headers": [{"key": "X-Robots-Tag", "value": "noindex, nofollow"}] } ] }