Skip to content
supastack
Browse documentation
WebTanStack Start

For AI agents: fetch the complete documentation index at /llms.txt, the full documentation corpus at /llms-full.txt, the agent skill at /skill.md, or this page as Markdown at /docs/tanstack/seo.md (or send Accept: text/markdown).

SEO and sharing

Metadata, sitemap, robots, and social images.

Before you begin

Open your downloaded supastack project in Visual Studio Code using File → Open Folder, then choose Terminal → New Terminal. The repository root is the folder containing package.json, apps and packages. Run the command below there and leave its terminal open. If a command is not recognized, finish the tool installation guide before continuing.

Read the platform tutorial first. A server is the app process that answers browser or phone requests. Web reads apps/web-tanstack/.env.local, Expo reads apps/mobile/.env.local, and database migration commands read root .env. The no-database /dashboard demonstration is separate from real /auth accounts, which need migrated Postgres. A phone or desktop-only checkout needs a separately running Web backend.

corepack pnpm --filter @supastack/web-tanstack dev

Setup and configuration

Route-level metadata comes from the shared page modules — each packages/web-core/src/pages/<route>/page.load.ts exports metadata that its file route surfaces through head() via metadataToHead, resolving titles and descriptions from the locale dictionaries so search results stay localized.

The src/routes/sitemap[.]xml.ts and src/routes/robots[.]txt.ts routes generate the crawlable surface; the rasterized OG image (src/framework/og.ts) and icon assets carry the social preview. Keep private routes — settings, billing, admin, API — out of the sitemap and disallowed in robots.

src/routes/sitemap[.]xml.ts   public routes only
src/routes/robots[.]txt.ts    disallow private surfaces

// per page — packages/web-core/src/pages/<route>/page.load.ts,
// surfaced through the route's head() via metadataToHead
export const metadata = { title, description };

Implementation workflow

Give every public page a unique title and description; never index search results, filtered views, or authenticated surfaces. Canonical URLs stay un-prefixed — the locale layer already redirects the default locale to the canonical path.

When you add a public route, add it to the sitemap in the same change. Keep OG imagery on brand tokens instead of baked screenshots so restyles stay consistent.

Verification and troubleshooting

Fetch /robots.txt and /sitemap.xml on a preview deploy, validate the sitemap parses, and share-check one page — title, description, image. Confirm a noindex header or meta on search-result pages.