Skip to main content
seofields
v1.5.5 — Sanity v3, v4 & v5

Complete SEO
toolkit for Sanity

Meta tags, Open Graph, X Cards, robots directives, live preview, and a built-in health dashboard — everything you need to ship SEO-ready content. Now the plugin is not only limited to SEO fields — with 24 Schema.org types, it's your complete AEO & GEO toolkit.

SEO Health

Your page is in excellent shape

Excellent
SEO Health Score: 100 out of 100
100score
Search Preview live

https://example.com › about

About Our Company — Example Site

Learn about our mission, team, and values. We build products that help businesses grow their online presence.

7SEO Schema Types
24Schema.org Types
100Point Scoring
27+Field Overrides
v3/v4/v5Sanity Support

Features

Everything you need for SEO

Meta tags, Open Graph, Twitter Cards, robots directives, live SERP preview, and a built-in health dashboard — all in one plugin.

🎯

Meta Tags

Title, description, keywords, canonical URLs with character guidance.

📊Free · $10 one-time later

Health Dashboard

100-point scoring system with actionable improvement tips. Track SEO health across all documents.

📱

Open Graph

Complete OG support — title, description, image, site name, URL, and type.

🐦

X (Twitter) Cards

Summary, large image, app, and player cards with handle support.

👁️

Live SERP Preview

See exactly how your page appears in Google results — in real time as you type.

🤖

Robots Directives

Control indexing, following, and max snippets per document.

🔧

27+ Field Overrides

Customize labels, descriptions, and placeholders for every field.

👁️‍🗨️

Field Visibility

Show or hide specific fields per document type or globally.

Zero Config

Works out of the box. Add to plugins and start using immediately.

🧩

24 Schema.org Types

Website, Organization, Article, FAQPage, Product, Event, and 18 more — each with typed JSON-LD generation for AEO & GEO.

Schema.org Integration

Beyond SEO fields — structured data

The plugin is not only limited to SEO fields anymore. With 24 Schema.org types built in, your content is ready for Google Rich Results, AI Overviews, Perplexity, and ChatGPT Search — the foundation of AEO & GEO.

🔍

SEO — Rich Results

FAQPage, HowTo, Product, and BreadcrumbList schemas unlock expandable snippets, star ratings, and breadcrumbs directly in Google Search.

🤖

AEO — Answer Engines

Structured FAQ and HowTo data helps answer engines like Google AI Overviews and Perplexity surface your content as direct answers.

GEO — Generative Search

Organization, Person, and entity schemas give LLM-powered search engines the context they need to understand and cite your content.

sanity.config.ts
import { defineConfig } from 'sanity'
import seofields from 'sanity-plugin-seofields'
import { schemaOrg } from 'sanity-plugin-seofields/schema'

export default defineConfig({
  plugins: [
    seofields(),    // SEO fields + dashboard
    schemaOrg(),    // all 24 Schema.org types
  ],
})
schemas/page.ts
import { defineField, defineType } from 'sanity'

export default defineType({
  name: 'page',
  type: 'document',
  fields: [
    // ... your other fields
    defineField({
      name: 'schemaOrg',
      title: 'Schema.org Structured Data',
      type: 'schemaOrg',   // ← combined array (all 24 types)
    }),
    // Or use a specific type:
    defineField({
      name: 'articleSchema',
      type: 'schemaOrgArticle',
    }),
  ],
})
app/layout.tsx
import {
  SchemaOrgScripts,
  ArticleSchema,
} from 'sanity-plugin-seofields/schema/next'

// Render combined array field
<SchemaOrgScripts items={data.schemaOrg} />

// Or use individual type components
<ArticleSchema data={data.articleSchema} />
Generated HTML output
<!-- Generated <script> injected in <head> -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "Getting Started with Schema.org",
  "description": "A guide to structured data for SEO",
  "datePublished": "2025-01-01T00:00:00Z",
  "author": {
    "@type": "Person",
    "name": "Jane Doe",
    "url": "https://example.com/authors/jane"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Acme Corp",
    "logo": {
      "@type": "ImageObject",
      "url": "https://example.com/logo.png"
    }
  },
  "image": "https://example.com/article-cover.jpg",
  "url": "https://example.com/blog/getting-started"
}
</script>

24 Schema.org types included

🌐

Website

Site identity & publisher

🏢

Organization

Company, logo & contacts

📰

Article

News & blog articles

FAQPage

Q&A rich results

📋

HowTo

Step-by-step guides

🛍️

Product

E-commerce products

🧭

BreadcrumbList

Navigation trails

📍

LocalBusiness

Local pack & Maps

🎪

Event

Conferences & meetups

👤

Person

People & authors

✍️

BlogPosting

Blog posts

Review

Individual reviews

🎓

Course

Educational content

🎬

VideoObject

Video rich results

📄

WebPage

Individual pages

💻

SoftwareApplication

Software & apps

💰

Offer

Pricing & availability

🌟

AggregateRating

Star ratings

🏷️

Brand

Brand entities

📞

ContactPoint

Support channels

🗺️

PostalAddress

Structured addresses

📌

Place

Venues & locations

🌍

WebApplication

Web-based tools

🖼️

ImageObject

Image metadata

How It Works

Three steps to SEO-ready content

1

Install & register

sanity.config.ts
import { defineConfig } from 'sanity'
import seofields from 'sanity-plugin-seofields'


export default defineConfig({
  plugins: [
    seofields(),   // zero-config
  ],
  schema: {
    types: [/* your schemas */],
  },
})
2

Add to your schema

schemas/page.ts
import { defineField, defineType } from 'sanity'

export default defineType({
  name: 'page',
  title: 'Page',
  type: 'document',
  fields: [
    defineField({ name: 'title', type: 'string' }),
    defineField({ name: 'slug', type: 'slug' }),
    defineField({
      name: 'seo',
      title: 'SEO',
      type: 'seoFields',
    }),
  ],
})
3

Query & render

lib/queries.ts
const query = groq`
  *[_type == "page" && slug.current == $slug][0]{
    title,
    seo {
      title,
      description,
      canonicalUrl,
      openGraph { title, description, image },
      twitter { card, title },
      robots { index, follow }
    }
  }
`
New in v1.5.0

CLI toolkit for developers

Manage SEO configuration, run health reports, and export data — all from your terminal. Six powerful commands to audit and optimize your content.

initAdd plugin to sanity.config
reportSEO health report
exportExport as JSON/CSV
doctorCheck setup & deps
CLI Documentation
npx seofields init
Terminal
npx seofields report
✔ Connected to my-project / production
✔ Found 12 documents with SEO fields
TitleScoreStatus
Homepage95Excellent
About Us88Good
Blog Index72Fair
Contact45Poor
Summary: 1 Excellent, 1 Good, 1 Fair, 1 Poor

Health Dashboard

Real-time SEO scoring

Every document gets an instant health score with field-level feedback — right inside Sanity Studio.

Free for 1–2 months — then $10 one-time to keep your key
SEO Health
SEO Health Score: 100 out of 100
100score

Excellent

All checks passed

Meta Title50–60 chars = 15 pts, any = 10 pts15 pts
Meta Description120–160 chars = 15 pts, any = 10 pts15 pts
Meta Imageimage asset configured10 pts
Keywordsat least one keyword present10 pts
Open Graphtitle + description + image + type25 pts
Twitter Cardtitle + description + image15 pts
Robotsnot set to noIndex5 pts
Image Completenessmeta + OG + Twitter images5 pts
Score range

Poor

0–29

Needs Work

30–59

Good

60–79

Excellent

80–100

Open Source · MIT License

Start optimizing your content

Free, open source, and ready to use. Install the plugin and start improving your SEO in minutes.