Skip to content

Keep control-plane responses out of search indexes - #244

Merged
tnkuehne merged 1 commit into
mainfrom
fix/control-plane-noindex
Nov 20, 2026
Merged

tnkuehne merged 1 commit into
mainfrom
fix/control-plane-noindex

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Search engines index the control plane: Google lists its root and sign-in page in search results. The control plane is a signed-in management UI and has no content that belongs in search results.

Change

Both server hooks (Node and Cloudflare Worker) set X-Robots-Tag: noindex before resolving a request. SvelteKit applies the header to every resolved response: pages, API responses, remote functions, health checks and 404 pages.

There is deliberately no Disallow in robots.txt. A crawler that cannot fetch a page never sees its noindex, and URLs that are already indexed can stay listed.

The control-plane Worker only serves the platform hostname. App hostnames are served by the runtime Worker, so app pages are not affected.

Redirects thrown from the session hook before resolve (for example / → /sign-in) do not carry the header. Search engines do not index redirect responses; they follow the redirect and see noindex on the target.

Tests

  • E2E (Node build): /sign-in, /recover, /healthz, /api/v1/apps and a 404 return X-Robots-Tag: noindex. The test fails without the change.
  • Worker (RUN_CLOUDFLARE_TESTS=1): /sign-in, /healthz and /api/v1/apps return the header from workerd.
  • pnpm check, the full auth.spec.ts (51 tests) and tests/cloudflare/control-plane.test.ts (16 tests) pass locally.

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge.

Summary

Adds X-Robots-Tag: noindex to resolved control-plane responses on Node and Cloudflare.

  • Control-plane responses tell search engines not to index them.

No actionable issues found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "Keep control-plane responses out of sear..." · Reviewed by Greptile

Search engines listed the control-plane sign-in page. Send
X-Robots-Tag: noindex on every response the Node and Worker hooks
resolve, so pages, API responses and error pages are not indexed.
@tnkuehne
tnkuehne merged commit 3dfc3f8 into main Nov 20, 2026
15 checks passed
@tnkuehne
tnkuehne deleted the fix/control-plane-noindex branch November 20, 2026 15:23
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