Skip to content

Stop the Search Console audit flagging intended noindex and slash redirects - #254

Merged
basit3407 merged 1 commit into
mainfrom
fix/search-console-audit-false-positives
Nov 11, 2026
Merged

basit3407 merged 1 commit into
mainfrom
fix/search-console-audit-false-positives

Conversation

@basit3407

Copy link
Copy Markdown
Collaborator

Why

The Search Console coverage exports from 2026-11-11 list "Crawled - currently not indexed" (206), "Page with redirect" (307) and "Excluded by noindex" (75). The site is healthy: every URL either serves a 200 or is noindexed on purpose, all 435 redirects take one hop to a 200 page, and none of the redirecting URLs is in the sitemap. Even so, audit-search-console-coverage.js --mode=live reported 280 failures, which hides any real regression in the next export.

The audit wrongly flagged three cases:

Wrong result Count Cause
unexpected-noindex 207 Pre-live docs are noindexed on purpose (#239), but the audit did not know that.
redirect-source-in-sitemap 69 For /docs/page -> /docs/page/, the slash variant of the source is the target, which is the canonical sitemap URL.
expected-redirect 1 http:// root. The resolver already requests the https origin, so the edge upgrade never appears in the chain.

Change

  • The noindex rules now come from static/_headers. Any path served with X-Robots-Tag: noindex counts as intentional, so _headers stays the single source of truth. Such a page still fails if it appears in the sitemap (noindex-url-in-sitemap), and noindex on any other page is still unexpected-noindex.
  • The redirect target is excluded from the source's slash variants before the sitemap check.
  • http:// sources are accepted under "Page with redirect".
  • 5 new tests in tests/search-console-coverage-audit.test.cjs.

Result

Re-running the live audit on the same three exports drops the failures from 280 to 3. The 3 that remain are real: /docs/tutorials/sync/{getting-started,handling-conflicts,offline-first-patterns}/ used to redirect and have served 200 since #244.

No site, build or sitemap change.

🤖 Generated with Claude Code

…irects

Running the live audit on the 2026-11-11 coverage exports reported 280
failures, but the site was healthy. The audit wrongly flagged three cases:

- Pre-live docs, /search/ and other paths that static/_headers serves
  with X-Robots-Tag noindex were reported as "unexpected-noindex". The
  audit now reads those rules from _headers and accepts the noindex,
  failing only if such a page is still in the sitemap.
- /docs/page -> /docs/page/ was reported as "redirect-source-in-sitemap"
  because the slash variant of the source is the redirect target itself.
- http:// URLs in "Page with redirect" were reported as
  "expected-redirect"; the resolver already requests the https origin,
  so the edge upgrade never appears in the chain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T14:27:59.230549Z d416b19 Manual request
🔒 Security Review ✅ Completed 2026-11-11T14:25:41.434312Z d416b19 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@basit3407

Copy link
Copy Markdown
Collaborator Author

@codex review

@basit3407
basit3407 merged commit 369993c into main Nov 11, 2026
1 of 2 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: d416b19fdd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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