Skip to content

fix(game): keep the API, the service worker and the offline page out of search results - #269

Merged
arrzdev merged 1 commit into
mainfrom
fix/noindex-api-sw
Nov 2, 2026
Merged

arrzdev merged 1 commit into
mainfrom
fix/noindex-api-sw

Conversation

@arrzdev

@arrzdev arrzdev commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Search Console listed `/_shell` (noindex since #226). An audit of the host for other URLs that answer 200 and are not pages found three more:

  • `/api/*`: JSON from the backend, no robots header. The backend now sets `X-Robots-Tag: noindex` on every response.
  • `/sw.js`: static script. `X-Robots-Tag: noindex` via `_headers`.
  • `/_pwa/offline-fallback`: a full HTML page with its own title. `X-Robots-Tag: noindex` via `_headers`, plus a robots meta in the file.

`robots.txt` still has no Disallow, so crawlers can read these headers. Real pages, including each language's, already carry a self canonical on `https://abalone.tudu.dev\` and are the only entries in `sitemap.xml` (checked against production).

Tests: backend plugin unit test, `_headers` rule check in `security-headers.test.ts`, and e2e requests for `/sw.js` and `/_pwa/offline-fallback` in `seo.spec.ts` next to the existing `/_shell` one.

@arrzdev
arrzdev merged commit ab0bc4e into main Nov 2, 2026
5 checks passed
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