Skip to content

fix(seo): make the sitemap canonical-only, healthy, and testable #1153

Open

Description

@KevinVandy

Problem

The production sitemap currently contains 3,245 URLs. A live audit found several categories of non-canonical or unhealthy entries:

  • 189 Charts catalog URLs use trailing slashes and immediately redirect to the no-trailing-slash canonical.
  • /showcase redirects to a default query-string URL before canonicalizing back to /showcase.
  • Four /drafts/ URLs and two README URLs are included.
  • Draft and README examples currently return 200 pages headed Content temporarily unavailable.
  • A stratified check of 160 sitemap entries found 23 redirects and one 404, including stale DB reference paths that redirect to a parent reference page or no longer resolve.
  • Only 77 entries currently contain lastmod values; docs and most other content do not.
  • Approved showcase detail pages are not included even though later showcase pagination is currently noindex/nofollow.

Google says sitemap entries should be the canonical URLs the site wants indexed: https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap

Relevant generation code: src/utils/sitemap.ts

Required changes

  • Emit only URLs that return 200, are indexable, and self-canonicalize.
  • Normalize Charts catalog entries to the production no-trailing-slash form.
  • Exclude drafts, *.draft paths, README files, temporary-unavailable placeholders, hidden libraries, and other non-public docs artifacts.
  • Apply docs redirect resolution before adding manifest paths to the sitemap.
  • Remove stale or missing generated-reference paths.
  • Reconcile /showcase so the sitemap entry does not require an avoidable redirect.
  • Add approved showcase detail pages if they are intended for organic discovery.
  • Keep query-string URLs only when they represent an intentionally indexable canonical page, such as the previous-partners directory.
  • Add accurate lastmod values where the source provides a real meaningful modification date; do not synthesize timestamps on every request.

Automated validation

Add a sitemap contract checker that can validate generated entries and optionally check a deployed base URL.

For every sitemap URL, verify:

  • Final status is 200 without following a redirect.
  • Exactly one canonical link exists.
  • Canonical equals the sitemap URL after consistent URL normalization.
  • No robots noindex directive is present.
  • The page is not a temporary-unavailable or error placeholder.
  • The URL has no disallowed draft, README, embed, account, or admin pattern.

Acceptance criteria

  • Production sitemap contains zero redirecting URLs.
  • Production sitemap contains zero 4xx or 5xx URLs.
  • Production sitemap contains zero noindex URLs.
  • Every entry is self-canonical.
  • Drafts and repository-maintenance documents are absent.
  • Charts catalog URLs use the same trailing-slash policy as their canonical pages.
  • Unit tests cover path filtering and canonical normalization.
  • A CI or release-time check prevents regressions in the sitemap contract.

Activity

  1. tannerlinsley commented on Nov 1, 2026

    @tannerlinsley
    Member

    The catalog URLs and draft/README entries are cleaned up now. This stays open for the rest of the sitemap contract, including the showcase redirect.

    AI review notes:
    #1469 and #1470 were independently tested, merged with passing checks, and deployed. A fresh production sitemap has 190 Charts catalog URLs without trailing slashes, no matching drafts or README artifacts, and all three curated Start examples still present.

    A new read-only contract checker is being validated. Its local HTTP fixture proves redirects fail without being followed, and its 12-entry production sample found a 307 on /showcase. That was a partial check, not verification of every sitemap entry. Remaining work includes that redirect, generated-reference health and redirect resolution, showcase detail coverage, and enforcing the complete deployed-page contract. #1267 separately covers source-failure handling and still awaits its prerequisite review.

  2. tannerlinsley commented on Nov 1, 2026

    @tannerlinsley
    Member

    The showcase redirect is fixed in production. The full sitemap check also turned up two root causes that the earlier sample missed, and this stays open for the remaining cleanup.

    AI review notes:
    #1472 is merged and deployed. A fresh /showcase request returns HTTP 200 directly, with one matching canonical and no noindex directive. #1473 fixes valid @tanstack reference paths being rejected by the shared path validator. It is merged after passing checks; the affected namespace document was verified at HTTP 200 with the right heading and canonical on its exact preview. Production follow-up is still pending for that fix.

    The completed baseline check covered all 7,278 sitemap URLs and reported 308 failures: one showcase redirect, 45 scoped-reference 404s, and 262 unavailable-heading findings. This scan crossed a deployment window, so those are captured baseline results, not the current remaining count. The title findings do not necessarily mean missing content: the testing guide rendered its body but used an unavailable title because frontmatter was absent. #1474 corrects that fallback and is verified on its exact preview, awaiting required team review.

    The failed set includes 251 DB contributing paths. Repository maintenance documents still need exclusion even if their headings become healthy. Curated showcase detail coverage, meaningful source modification dates, and enforcing the complete release contract also remain. #1471's checker corrections are tested and pushed, with its required review still outstanding. #1267 retains its prerequisite review hold.

  3. tannerlinsley commented on Nov 1, 2026

    @tannerlinsley
    Member

    The sitemap cleanup is now verified across the full current sitemap. This stays open for the remaining title failures and the pending contract and showcase changes.

    AI review notes:
    The fresh production check covered all 7,025 entries without following redirects. Ten failed, all because their heading says “Content temporarily unavailable”. No other status, canonical, robots, or disallowed-path failures were reported in this run. This is a point-in-time check, not a guarantee against future changes.

    Those ten pages match the set already verified on #1474's preview. That fix still needs required review. #1471 provides the release-time checker, #1476 adds curated showcase details, and #1267 handles source failures with its existing prerequisite review hold. None of those pending changes is claimed live.

    The namespace reference fix, repository-artifact exclusions, showcase redirect fix, and corrected blog modification dates are production verified. Source-less modification dates remain omitted rather than fabricated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions