Skip to main content
seofields
docs
.md

Installation

Install the plugin with your preferred package manager.

npm

Package Managers

$npm install sanity-plugin-seofields

Requirements

Sanity Studiov3, v4, v5 or v6
Reactv18 or v19

Register the Plugin

Add the plugin to your sanity.config.ts (or .js) file:

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

export default defineConfig({
  name: 'your-project',
  title: 'Your Project',
  projectId: 'your-project-id',
  dataset: 'production',
  plugins: [
    seofields(),  // Add the SEO fields plugin
    // ... other plugins
  ],
  schema: {
    types: [
      // ... your schema types
    ],
  },
})

Note: The plugin works with zero configuration. The live SERP preview is on by default; the SEO Health Dashboard needs a license key.

Verify the installation

  1. Add a field of type seoFields to a document type, for example defineField({ name: 'seo', type: 'seoFields' }).
  2. Start Studio with npx sanity dev, open a document of that type and expand the SEO field. You should see title, description, Open Graph and X fields, the SERP preview and character counters.
  3. Run npx seofields doctor. It checks locally that your Studio config exists, the plugin is registered and the sanity and react peer dependencies are installed.

Troubleshooting

  • ERESOLVE peer dependency error on Studio 6: upgrade to sanity-plugin-seofields@1.11.0 or later, which widened the supported Studio range to include v6.
  • Missing icon export errors: use version 1.11.0 or later. It works with the @sanity/icons versions that Studio 3 to 6 ship.
  • Nothing appears in the document: confirm the field type is seoFields (case-sensitive) and that seofields() is in the plugins array.

Installation FAQ

Which Sanity Studio versions does sanity-plugin-seofields support?

Sanity Studio v3, v4, v5 and v6, with React 18 or 19.

Do I need a license key to install it?

No. The core plugin is free and MIT licensed. A one-time $20 license per Sanity project unlocks the SEO Health Dashboard, Publish Gate and other paid features.

Does it work with pnpm and yarn?

Yes. Install it with npm, yarn or pnpm; the commands are on this page.

Optional: License Key for Paid Features

The core plugin works without a key. To use paid features, add a valid root-level license key. $20 per Sanity project unlocks paid plugin features as a one-time purchase. Roadmap improvements are tracked on the roadmap. One-time payment, no subscription.

Get your license key at the Get License page →

See Dashboard docs for setup instructions and configuration options.

Was this page helpful?