# 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.

*Canonical: https://makerkit.dev/docs/void-cloudflare/marketing/seo*

---

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](./overview).

## What the Kit Serves

| Address | What it is | Controlled by |
| --- | --- | --- |
| `/robots.txt` | Tells crawlers to read the site and skip the API and app pages | `apps/web/lib/seo.server.ts`, your extras in `apps/web/config/seo.config.ts` |
| `/sitemap.xml` | Every marketing page and published blog, changelog and docs entry | the page files and `apps/web/config/content.server.ts` |
| `/llms.txt` | A plain list of your docs and blog for AI answer engines | the 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`).

## Pages Left Out of Search

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`:

| Key | Use it to |
| --- | --- |
| `excludePaths` | keep a marketing page out of the sitemap and `llms.txt`, e.g. `['/pricing']` |
| `extraPaths` | add a page the kit can't find |
| `disallowPaths` | ask crawlers to skip more paths |
| `twitterSite` | name 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](./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.
