Skip to main content
seofields
docs

WebPage

The WebPage schema type represents a single page on a website. It helps search engines understand the page's content, language, and relationship to the parent site.

About WebPage

WebPage markup connects individual pages to their parent WebSite entity, creating a clear hierarchy for search engines and AI answer systems. Use it alongside WebSite and BreadcrumbList schema to describe page context, canonical identity, and relationships without relying on hidden or duplicated content.

Fields

FieldTypeRequiredDescription
namestringThe title of the web page as it should appear in search results.
urlstringThe canonical URL of this specific page.
descriptionstringA short summary of the page content for search engines and AI assistants.
inLanguagestringThe language of the page content (e.g. en, es, fr).
publisherstring | objectThe organization or person that published this page — either a URL string or an object with name and logoUrl.
licensestringURL of the license for this page content, if applicable.

Plugin Registration

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

export default defineConfig({
  // ... your sanity config
  plugins: [
    schemaOrgWebPagePlugin(),
  ],
})

Schema Usage

Add the schemaOrgWebPage field to any document schema:

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

export default defineType({
  name: 'page',
  title: 'Page',
  type: 'document',
  fields: [
    // ... your other fields
    defineField({
      name: 'schemaOrgWebPage',
      title: 'WebPage Schema',
      type: 'schemaOrgWebPage',
    }),
  ],
})

GROQ Query

GROQ query
*[_type == "yourDocument"][0]{
  schemaOrgWebPage {
    name,
    url,
    description,
    inLanguage,
    publisher,
    license
  }
}

Next.js Component

app/layout.tsx
import { WebPageSchema } from 'sanity-plugin-seofields/schema/next'

export default function Layout({ data }) {
  return <WebPageSchema data={data.schemaOrgWebPage} />
}

JSON-LD Output

Generated JSON-LD
{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "name": "About Us",
  "url": "https://example.com/about",
  "description": "Learn about our company and mission.",
  "inLanguage": "en",
  "publisher": {
    "@type": "Organization",
    "name": "Acme Corp",
    "logo": {
      "@type": "ImageObject",
      "url": "https://example.com/logo.png"
    }
  },
  "license": "https://creativecommons.org/licenses/by/4.0/"
}

Last updated: May 27, 2026. Tested with: Sanity Studio v3, v4, and v5.

Was this page helpful?