Skip to content

tanstack: pages with no SEO source get the site's default head and robots index (Fresh emits none) #656

Open

Description

@aline-pereira

Problem

cmsRouteConfig (packages/tanstack/src/routes/cmsRoute.ts) gives every page a full <head> even when the page has no source of SEO at all — no page.seo and no section registered via registerSeoSections. buildPageSeo (if (!seoSection) branch, ~line 743) takes the Site app's seo block as the primary source, and buildHead always emits <title>, description, og:*, twitter:* and robots: index, follow, ….

On Deco for Fresh the _title ?? appTitle fallback only runs inside the SeoV2 loader; a page with no seo block and no SEO section emits no SEO tags.

Reproduction

Measured on deco-sites/oficina-tanstack (QA-163, N4), prod × preview, /the-post/not-found (the target of every missing blog post) and /offline:

  • production: only charset and viewport — no <title>, no robots;
  • preview: title/description/og/twitter of the site (Oficina - Roupas Masculinas Premium), robots index, follow, max-image-preview:large, …, theme-color.

So an error/offline page is announced as indexable with the home's metadata.

Expected

When a page has neither page.seo nor a registered SEO section, do not apply siteSeo as a primary source and do not emit the robots/OG/Twitter defaults — or at least not robots index. The ignoreStructuredData/bot-aware machinery is unaffected. Low priority on the Oficina side (error and offline pages), filed so the divergence is on record rather than patched per site.

Reference

deco-cx website/sections/Seo/SeoV2.tsx (loader-level fallback) and website/components/Seo.tsx — tags are emitted only by a rendered SEO section.

Found while validating deco-sites/oficina-tanstack#479.

🤖 Generated with Claude Code

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions