Sanity is flexible enough to model SEO however a team wants, which is exactly why it needs deliberate structure. Left unstructured, editors end up asking developers to fix titles and descriptions one page at a time.
Building or migrating a marketing site onto Sanity and Next.js?
See the Sanity + Next.js serviceModel SEO as a shared object, not scattered fields
Every content type that renders a page needs the same SEO shape. A shared `seo` object type keeps this consistent and makes the Next.js query layer predictable.
- Define one reusable `seo` object with title, description, canonical override, and social image.
- Attach it to every top-level document type: pages, posts, services, and landing pages.
- Set sensible fallbacks (page title, page description) so an empty SEO field never ships blank metadata.
Keep canonical and indexing decisions in the CMS
Editors, not developers, usually know when a page should be noindexed or canonicalized to another URL. That decision needs a field, not a deploy.
- Add a boolean `noindex` field and a `canonicalOverride` URL field to the SEO object.
- Surface both in the Sanity Studio with clear labels so non-technical editors use them correctly.
- Read these fields directly in the Next.js `generateMetadata` function rather than hardcoding exceptions in code.
Wire structured data from the same source
Schema.org markup should be generated from the same content Sanity already stores, not duplicated by hand for each page.
- Generate `Article`, `Service`, or `Product` JSON-LD in Next.js from the Sanity document fields already used for the visible page.
- Avoid a separate, manually maintained schema field that can drift from the actual content.
- Validate output with a structured data testing tool after every schema change.
Make image SEO explicit in the schema
Sanity's image pipeline is strong, but alt text and focal points still need to be required fields, not optional ones editors forget.
- Require alt text on every image field used in rendered content.
- Use Sanity's image URL builder to serve responsive, correctly sized images to Next.js `Image`.
- Set explicit width and height or aspect ratio to avoid layout shift that hurts Core Web Vitals.


