Sanity SEO

Sanity SEO for Northern Ireland Specialist Headless CMS SEO

Sanity gives your team total control over your content architecture - but headless SEO is significantly harder to get right than plugin-based SEO. Metadata pipelines, structured data implementation, rendering strategy, crawl configuration and canonical management all sit outside Sanity itself, in the front-end layer where most SEO issues quietly accumulate.

Talk to us about your Sanity project
Explorer
app
[slug]
page.tsx
components
SeoHead.tsx
lib
sanity.ts
queries.ts
next.config.ts
sitemap.ts
page.tsx
SeoHead.tsx
queries.ts
1// app/[slug]/page.tsx
2import { client } from '@/lib/sanity'
3import { PAGE_QUERY } from '@/lib/queries'
4 
5export async function generateMetadata({ params }) {
6  const page = await client.fetch(PAGE_QUERY, params)
7  return {
8    title: page?.seo?.title,
9    description: page?.seo?.description,
10    alternates: { canonical: page?.slug },
11    // âš  openGraph missing - unfurling broken
12  }
13}
14 
15// TODO: generateStaticParams, schema JSON-LD
SEO Audit
OG tags missing on all routes
No JSON-LD schema implemented
sitemap.ts not returning dynamic routes
ISR revalidation not configured
SSR rendering confirmed
Need help with your Sanity project? Talk to the SplinterSEO team today.
Get in touch
Headless SEO

Why Sanity SEO is fundamentally different from platform-based SEO

With a traditional CMS like WordPress, SEO is handled largely through plugins. Install Yoast or Rank Math, configure a few settings and the core metadata, sitemap and structured data infrastructure is in place. Sanity does not work that way. As a headless CMS, Sanity is responsible for your content - but every SEO output your site needs has to be built into the front end by your development team.

This is both the strength and the challenge of the Sanity and Next.js stack. You have complete flexibility to implement SEO exactly as it should be done, without the constraints of a plugin architecture or a platform's opinionated URL structure. But that flexibility means there is no safety net. If your generateMetadata function is missing fields, if your sitemap does not include dynamic routes, if your structured data is not being injected server-side, or if your rendering strategy is leaving content invisible to crawlers - none of that will be flagged by a plugin. You have to know to look for it.

Most Sanity projects we audit have been built by excellent development teams who understand the front-end architecture deeply but have not had dedicated SEO input at the design stage. The result is sites that perform well technically and look great but are leaving significant organic visibility on the table due to gaps in their metadata pipeline, schema implementation and crawl configuration.

No SEO plugin safety net Every metadata output, canonical tag, sitemap entry and structured data block must be explicitly built and maintained in your front-end codebase.
GROQ queries must surface SEO fields If your Sanity queries do not fetch the SEO object, metadata will be missing from rendered pages regardless of what editors have entered in the Studio.
Rendering strategy determines visibility SSR, SSG and ISR each have different implications for crawl freshness and indexation. The wrong strategy for your content type can leave pages invisible or stale in Google's index.
Core Web Vitals need active management The performance advantages of Next.js are real but not automatic. Image optimisation, font loading, bundle size and ISR configuration all require deliberate decisions that affect your CWV scores.
What we do

What is included in our Sanity SEO service

We audit, plan and implement across the full headless SEO stack - from your Sanity schema and GROQ queries through to Next.js rendering strategy, structured data and ongoing content performance.

Headless SEO audit

We audit your entire headless stack - Sanity schema, GROQ queries, Next.js metadata pipeline, sitemap generation, rendering strategy, Core Web Vitals and structured data - producing a prioritised list of issues and recommendations specific to your implementation.

Sanity schema and SEO field review

We review your Sanity schema to ensure SEO fields are correctly defined, consistently named and surfaced in the Studio in a way that editors can use confidently. We identify missing fields and recommend schema additions that will improve metadata control across content types.

Metadata pipeline and GROQ query review

We audit your GROQ queries to confirm they are fetching all required SEO fields, review your generateMetadata implementation for completeness and identify gaps in title, description, canonical, Open Graph and Twitter Card output across all route types.

Rendering strategy and crawl configuration

We review your SSR, SSG and ISR configuration across route types, assessing whether your rendering choices are appropriate for each content type's update frequency and crawl requirements. We also audit your sitemap generation to confirm all dynamic routes are included.

Structured data implementation

We design and implement JSON-LD schema server-side in your Next.js components, covering Organisation, WebSite, Article, BreadcrumbList, Product and the types relevant to your content model. We validate every block against Google's Rich Results Test and monitor via Search Console.

Core Web Vitals and performance

We audit your Next.js implementation for performance bottlenecks affecting LCP, CLS and INP, covering next/image configuration, font loading strategy, bundle size, ISR revalidation and any third-party scripts that may be degrading your Core Web Vitals scores.

Common issues

Common Sanity and Next.js SEO problems we fix

These are the issues we find most frequently when auditing Sanity-powered Next.js sites, and what we do to resolve them.

The problem

Incomplete generateMetadata across route types

The most common issue we find is a generateMetadata implementation that handles the primary page type correctly but leaves dynamic routes, category pages, tag archives or paginated routes returning incomplete or missing metadata. These gaps are often invisible in development but result in large numbers of pages being indexed without titles or descriptions.

How we fix it

Full metadata audit and implementation review

We crawl your site and cross-reference rendered metadata against what Sanity is serving, identifying every route type where metadata is missing, duplicated or falling back to defaults. We then produce implementation specifications covering every route, including Open Graph, Twitter Card, canonical and robots directives, for your development team to implement.

The problem

Dynamic routes missing from the sitemap

A Next.js sitemap.ts file that only includes static routes and does not query Sanity for dynamic content will omit the majority of a site's pages from the sitemap submitted to Google. This is particularly damaging for content-heavy sites where thousands of pages may be absent from the sitemap, slowing discovery and indexation significantly.

How we fix it

Dynamic sitemap generation via GROQ

We write or correct the GROQ queries that power your sitemap generation to ensure all published content types are included, with accurate lastModified values pulled from Sanity's document timestamps. For large sites we implement sitemap index files to stay within Google's sitemap size limits and ensure all content is discoverable.

The problem

No structured data implemented server-side

Many Sanity and Next.js projects we audit have no JSON-LD schema implemented at all, or have schema injected client-side via a third-party script that renders after the initial HTML - meaning Googlebot may not reliably process it. Without structured data, your content is ineligible for rich results and less legible to AI search platforms including Google's AI Overviews.

How we fix it

Server-side JSON-LD via Next.js components

We design and implement structured data using Next.js script tags with type="application/ld+json" rendered server-side in your layout or page components, populated with data fetched from Sanity at request or build time. This guarantees Googlebot sees the schema in the initial HTML response without any client-side rendering dependency.

The problem

ISR revalidation too infrequent for editorial content

Sites using Incremental Static Regeneration with long revalidation windows can serve stale metadata and content to Googlebot for hours or days after an editor publishes an update in Sanity Studio. For news, blog or frequently updated content, this creates a disconnect between what editors publish and what search engines index.

How we fix it

Revalidation strategy and on-demand purging

We review your revalidation configuration and recommend appropriate revalidate values per content type, and where supported implement Sanity webhook-triggered on-demand revalidation so that published changes are reflected immediately without waiting for a revalidation window to expire.

The problem

SEO fields absent or inconsistent in Sanity schema

When the Sanity content schema does not include a well-structured SEO object, editors have no way to control page titles, meta descriptions or Open Graph images from within the Studio. The result is either hardcoded fallbacks that are identical across all pages, or metadata derived from content fields in ways that produce poor or truncated output.

How we fix it

SEO object schema design and Studio configuration

We design a reusable SEO object schema for Sanity that covers title, description, Open Graph image, canonical override and noindex flag, and specify how it should be added to each document type. We also provide guidance on Studio field configuration so editors can understand what each field controls and how to use it correctly.

Our process

How our Sanity SEO service works

1

Headless SEO audit

We audit your Sanity schema, GROQ queries, Next.js metadata implementation, rendering strategy, sitemap, structured data and Core Web Vitals - producing a clear picture of what is working and what is not before we recommend anything.

2

Strategy and specifications

We produce a prioritised action plan with developer-ready specifications for every recommended change, covering schema additions, metadata pipeline updates, sitemap improvements, JSON-LD implementation and rendering strategy adjustments.

3

Implementation support

We work alongside your development team throughout implementation, answering technical questions, reviewing pull requests for SEO correctness and validating changes in staging before they go live, so nothing ships that undoes the work.

4

Monitoring and ongoing growth

Once foundations are in place we move to content strategy, keyword targeting and authority building, with monthly reporting on rankings, organic traffic and crawl health so you can see exactly what the SEO investment is delivering.

Why SplinterSEO

Why development teams choose SplinterSEO for headless SEO

Headless SEO requires someone who understands both the technical architecture and the search fundamentals. We speak both languages, which means we can work directly with your development team without translation overhead.

We understand the headless stack

We know how Sanity's content model, GROQ queries, Next.js metadata APIs and rendering strategies interact with each other from an SEO perspective. We do not need your team to translate technical context into plain English before we can help.

Developer-ready specifications

Every recommendation we make comes with a clear written specification your developer can implement without ambiguity. We include code examples, file paths and expected outputs so nothing requires interpretation.

Honest, no-contract approach

We do not lock clients into long-term contracts. We are upfront about what headless SEO requires in terms of development time and ongoing content effort, so you can make an informed decision before committing.

Focused on organic outcomes

We measure success by rankings, organic traffic and leads, not by the number of recommendations we produce. Everything we prioritise is tied to something that will move those numbers.

Clear reporting, no jargon

Your monthly report tells you what has changed, why it matters and what we are working on next, written clearly for both technical and non-technical stakeholders on your team.

Who it is for

Who is Sanity SEO right for?

Our Sanity SEO service is built for teams who have invested in a headless architecture and want to make sure their SEO implementation is as strong as the rest of their technical stack.

Development teams building on Sanity and Next.js

You have built a well-architected headless site but SEO was not a primary focus during development. You know the metadata pipeline has gaps, schema is not implemented and the sitemap may not be covering all your dynamic routes - and you want someone who can audit the full stack and tell you exactly what needs fixing.

Digital agencies building client sites on Sanity

You are an agency that builds on Sanity and Next.js and wants an SEO partner who can plug in at the project level - advising on schema design, reviewing metadata implementation in code review and providing ongoing SEO support for clients after launch.

Content-heavy sites migrating to headless

You are migrating an existing site to a Sanity and Next.js stack and need SEO expertise at every stage - from pre-migration URL mapping and redirect planning through to post-migration validation and monitoring to ensure no organic visibility is lost in the transition.

Businesses where organic search is a growth priority

You have a Sanity-powered site that is generating some organic traffic, but you believe there is significantly more visibility available. You want a structured content and technical SEO strategy that builds on your headless architecture's performance advantages to compete for high-value keywords in your market.

Northern Ireland and UK businesses on modern stacks

You are a business or agency in Northern Ireland or the wider UK operating on a modern headless stack who wants an SEO partner that understands both the technology and the market. We understand the Northern Ireland digital landscape and work with teams across the UK on Sanity-powered projects.

It may not be the right fit if...

You need SEO improvements immediately but your development team has no capacity to implement changes. Our recommendations require developer time to action.

Your site is still in early development. SEO input is most valuable once the architecture and routing structure are established.

You are looking for a one-off checklist rather than a considered strategy. Headless SEO has enough moving parts that a checklist without context tends to miss the issues that actually matter.

Not sure if your project is the right fit? Get in touch with a brief description of your stack and your goals and we will give you an honest answer.

Contact Us About Your Sanity Project

FAQs

Sanity SEO questions answered

Does Sanity have built-in SEO features?
Sanity itself does not handle SEO - it is a headless CMS focused entirely on content management and delivery via API. All SEO outputs, including metadata, canonical tags, sitemaps and structured data, must be implemented in your front-end application. Sanity does have a plugin ecosystem that includes tools like sanity-plugin-seo and the ability to build custom SEO input fields within the Studio, but these only surface the fields to editors - the actual rendering of that data as HTML metadata is the responsibility of your Next.js or other front-end framework.
Is Next.js good for SEO when used with Sanity?
Yes - the Next.js and Sanity combination is one of the strongest stacks for SEO when implemented correctly. Next.js supports server-side rendering and static generation out of the box, which means Googlebot receives fully rendered HTML rather than a JavaScript shell that requires client-side execution. The generateMetadata API, sitemap.ts file and server-side JSON-LD injection all give you precise control over every SEO signal. The challenge is that this control requires deliberate implementation - the framework does not configure SEO for you the way a WordPress plugin does.
What is the best way to handle metadata in a Next.js and Sanity project?
The recommended approach is to use Next.js's generateMetadata function in your page components, fetching SEO fields from Sanity via GROQ at request or build time. Your Sanity schema should include a dedicated SEO object on each document type containing at minimum a title, description and Open Graph image. The generateMetadata function then maps these fields to Next.js's Metadata type, covering title, description, alternates.canonical, openGraph and twitter properties. Fallback values should be defined for cases where editors have not filled in the SEO fields, but these should never be identical across multiple pages.
How should structured data be implemented in a Next.js and Sanity project?
Structured data should be injected server-side using a script tag with type="application/ld+json" rendered in your Next.js layout or page component. The JSON-LD content should be populated with data fetched from Sanity, so that schema properties like name, description, image and url are dynamic rather than hardcoded. Avoid injecting schema client-side via useEffect or third-party tag managers, as Googlebot may not reliably execute JavaScript when crawling and the schema may not be present in the initial HTML response.
How do you generate a sitemap for a Sanity and Next.js site?
Next.js 13 and above supports a sitemap.ts file in the app directory that exports a sitemap function returning an array of URL objects. For a Sanity-powered site, this function should query Sanity using the server-side client to fetch all published documents of each content type, map them to their front-end URLs, and include lastModified values from Sanity's _updatedAt field. For sites with more than 50,000 URLs, implement sitemap index files. The sitemap should be submitted to Google Search Console and referenced in your robots.txt file.
We are based in Northern Ireland. Can you help with Sanity SEO locally?
Yes. SplinterSEO is based in Northern Ireland and we work with development teams and businesses across Northern Ireland and the wider UK. Headless CMS projects are inherently remote-friendly, and we work asynchronously or via calls depending on your team's preference. Whether you are a digital agency in Belfast building client sites on Sanity, an in-house team in Northern Ireland managing a Next.js application, or a UK business working with a distributed development team, we can provide the SEO expertise your project needs.