WebSite Schema Markup Guide

WebSite schema markup on your homepage enables the Sitelinks Searchbox in Google Search — the search input that sometimes appears under your site listing, letting users search your site directly from the search results page. It also helps Google associate your site name with your domain. Every site should have a WebSite schema on its homepage.

Required Properties

PropertyTypeDescription
namerich result
stringThe name of the website.
urlrich result
URLThe URL of the website's homepage.

Recommended Properties

Missing recommended properties generate warnings. They won't block validation, but rich result-tagged properties are needed for full Google rich result eligibility.

PropertyTypeDescription
potentialActionrich result
SearchActionA SearchAction that enables the Sitelinks Searchbox. Requires target (URL template) and query-input.
description
stringA description of the website.
sameAs
URL arrayURLs that verify this website's identity on other platforms.

Rich Result Eligibility

Rich result type: Sitelinks Searchbox

Requirements: Required: name and url. For Sitelinks Searchbox: add potentialAction as a SearchAction with target URL template and query-input.

Example valid WebSite JSON-LD

{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "Example",
  "url": "https://example.com",
  "description": "The official website of Example.",
  "potentialAction": {
    "@type": "SearchAction",
    "target": {
      "@type": "EntryPoint",
      "urlTemplate": "https://example.com/search?q={search_term_string}"
    },
    "query-input": "required name=search_term_string"
  }
}

Validate via API

Validate this schema against Google's requirements in one API call:

curl "https://schemacheck.dev/api/v1/validate" \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonld":{"@context":"https://schema.org","@type":"WebSite","name":"Example","url":"https://example.com","description":"The official website of Example.","potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://example.com/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}}'

Official Documentation

Google Structured Data: WebSite

Validate your WebSite schema now

100 free validations/month. No credit card required.