SEO: Search and Link Previews

How the kit tells search engines and AI tools about your site: robots.txt, sitemap.xml, llms.txt, share image, noindex, and what to set for staging and production.

The kit makes your public pages findable and gives shared links a title, a description and a picture. New pages and posts need no extra work.

This page is part of the Marketing documentation.

What the Kit Serves

AddressWhat it isControlled by
/robots.txtTells crawlers to read the site and skip the API and app pagesapps/web/lib/seo.server.ts, your extras in apps/web/config/seo.config.ts
/sitemap.xmlEvery marketing page and published blog, changelog and docs entrythe page files and apps/web/config/content.server.ts
/llms.txtA plain list of your docs and blog for AI answer enginesthe same list as the sitemap

Every address in these files starts with your SITE_URL, never with the address the visitor typed.

Set Your Site Address

  1. Set SITE_URL to your live address, for example https://yourdomain.com, with pnpm --filter web exec void secret put SITE_URL.
  2. Deploy again.
  3. Open https://yourdomain.com/robots.txt: it must list a Sitemap: line, not Disallow: / alone.

On any other address (a staging site, a preview) /robots.txt says Disallow: /, so those copies stay out of search. The same happens while SITE_URL is localhost. Pages on a preview still point their canonical link at SITE_URL, so a copy never competes with your real site.

Keep SITE_URL as http://localhost:5173 in apps/web/.env for local work: only the live site gets the real address. Then run SITE_URL=https://yourdomain.com pnpm kit:doctor --prod: it reads your live /robots.txt and flags one that blocks everything or has no sitemap link.

Add a Share Image

  1. Make a 1200 × 630 pixel PNG.
  2. Save it over apps/web/public/images/og.png.

Every page uses it as the picture a shared link shows. The kit ships a placeholder there (the product name on a dark background) so previews work from the first day; pnpm kit:doctor --launch flags it until you replace it.

A blog, changelog or docs entry can show its own picture: put image: /images/my-post.png at the top of the entry (a file in apps/web/public/, or an https address from the collection's imageOrigins).

Search engines are told to skip every page that is not a marketing page: sign-in, the app, invitation links, password reset and every 404. The kit sends X-Robots-Tag: noindex on those responses (apps/web/middleware/11.robots.ts), and /robots.txt asks crawlers to stay away from them too. Marketing pages never get it.

Change What Is Listed

Edit apps/web/config/seo.config.ts:

KeyUse it to
excludePathskeep a marketing page out of the sitemap and llms.txt, e.g. ['/pricing']
extraPathsadd a page the kit can't find
disallowPathsask crawlers to skip more paths
twitterSitename your X account, e.g. '@acme'

Drafts never appear. A page with a locale prefix (/it/faq) and /blog/page/2 style index pages are not listed; each index page still has its own canonical link.

Add a Page

Call pageHead in the page's head, with its own path (see Adding a Page). It sets the title, description, canonical link and link-preview tags. Every marketing page must use it.

Structured Data

The landing page adds Organization data (name, site address and logo) and each blog post adds BlogPosting data. The FAQ page adds FAQPage data.