AEO and SEO best practices for Sanity

Answer engines and search engines share the same foundation. Here is the opinionated, drift-proof setup we ship in Turbo Start Sanity to rank on both.

Answer Engine Optimisation (AEO) and traditional SEO are not two projects. They sit on the same foundation: clean structured content, honest metadata, fast semantic HTML, and machine-readable signals. Get the foundation right and you serve Google, ChatGPT and Perplexity from the same source of truth.

Here is the setup we default to, drawn from production work and baked into Turbo Start Sanity.

Baseline fields do double duty

Every document carries a title and a description. Those two fields become the H1, the <title> tag, the meta description, the card blurb and the Open Graph text. Author them once, well, and they cascade everywhere.

An SEO tab with fallbacks, not duplicates

Override fields belong on a separate SEO tab and should fall back to the baseline when empty. The blog schema in Turbo Start Sanity ships exactly this: seoTitle, seoDescription, seoImage, plus two switches that do very different jobs.

  • seoNoIndex adds a noindex robots directive so a page stays reachable but out of the index.
  • seoHideFromLists filters the document out of GROQ list queries so it never appears in feeds or sitemaps.

Keeping those two distinct matters. One controls crawlers; the other controls your own listings.

Derive JSON-LD in code

Do not make editors hand-author structured data. Generate JSON-LD at render time from fields you already have, with the same fallback chain as your metadata:

Freshness signals

Sitemaps should use _updatedAt as the last-modified signal and respect the seoNoIndex and seoHideFromLists flags. Surfacing both a published and an updated date tells crawlers and answer engines the content is maintained.

Feed agents Markdown, not HTML

The cheapest AEO win is letting agents read a clean version of your page. Turbo Start Sanity serves any page as Markdown: append .md to the URL or send Accept: text/markdown, and a proxy rewrites the request to a route that fetches the page's Sanity data and serializes it. Agents get semantic Markdown instead of paying tokens to strip your HTML. Pair it with a curated llms.txt index so assistants can navigate the site.

The unglamorous foundation

  • Semantic landmarks: <main>, <article>, <nav>, plus a skip link and visible focus states. Accessibility is an AEO ranking signal, not a nicety.
  • Author documents modelled as entities so you can emit Person schema and earn E-E-A-T signals.
  • Canonical URLs, and redirects modelled as their own document type so editors manage them without a deploy.
  • An OG image with a sensible generated fallback.

Guard against drift

Content rots when nobody is watching. Validate at three levels: in the schema, in CI on pull requests, and at runtime. A weekly automated crawl — increasingly, an agent — catches the regressions humans skim past. Set and forget, then verify on a loop.