Free Website Schema Generator - JSON-LD | OneStepToRank

Website Schema Generator

Generate valid WebSite JSON-LD structured data with SearchAction markup. Enable Google's sitelinks search box and help search engines understand your site.

Build Your WebSite Schema

A unique identifier for this schema node. Often the site URL with a #website fragment.
A shorter name or abbreviation your brand is known by.
BCP-47 language code. Common values: en-US, en-GB, es, fr, de, pt-BR, ja, zh-CN.
Adds a SearchAction property so Google can display a search box beneath your site's listing in search results.
Replace the search query part of your site's search URL with {search_term_string}. For WordPress, this is typically https://example.com/?s={search_term_string}

Your WebSite Schema Markup

application/ld+json

HTML <script> tag

Simulated Google Sitelinks Search Box Preview
Fill required fields Paste this code in your website's <head> section or before the closing </body> tag.

Test Your Markup

After adding the schema to your site, validate it with these tools:

Rich Results Test Schema Validator

Want Automated Schema Monitoring?

OneStepToRank monitors your structured data in production, alerts you when schema breaks, and tracks how your rich results change over time.

Get Started

What is WebSite Schema?

WebSite schema is structured data markup that describes your website as an entity to search engines. Built on the Schema.org WebSite type, it provides machine-readable information about your site's name, URL, publisher, language, and most importantly, its search functionality. When Google reads this markup, it can display your site name correctly in search results and enable the coveted sitelinks search box -- a search input that appears directly beneath your listing on the Google results page.

Without WebSite schema, Google has to infer your site name from page titles, headings, and other signals, which often leads to inconsistent or incorrect display. By explicitly declaring your site's identity through structured data, you take control of how your brand appears across all Google Search features. This markup is placed on your homepage and applies to your entire domain.

How the Sitelinks Search Box Works

The sitelinks search box is powered by the SearchAction property within your WebSite schema. This property includes a URL template that tells Google exactly how to construct a search URL for your site. When a user types a query into the search box displayed in Google results, Google uses your template to redirect them directly to your internal search results page. This feature dramatically reduces the steps between a user's intent and finding relevant content on your site.

To enable the sitelinks search box, your WebSite schema must include a potentialAction of type SearchAction with a target containing an EntryPoint and a urlTemplate. The URL template uses the placeholder {search_term_string} where the user's query will be inserted. Google also requires the query-input property to specify that the search term is a required parameter. This generator handles all of these requirements automatically.

Why Every Website Should Have WebSite Schema

WebSite schema is one of the simplest and most impactful forms of structured data you can add to your site. Here is what it provides:

  • Correct site name display -- Google shows your preferred site name in search results instead of guessing from your domain or page titles.
  • Sitelinks search box eligibility -- Only sites with proper SearchAction markup can trigger the search box in Google results, giving users a direct path to your content.
  • Brand identity signals -- The publisher and alternate name properties reinforce your brand identity and help Google connect your site to your organization's Knowledge Graph entity.
  • Foundation for other schema -- WebSite schema serves as the root node that other schema types on your site can reference, creating a connected graph of structured data across your entire domain.

Implementation takes less than five minutes. Add the generated JSON-LD script to your homepage's <head> section and validate with the Rich Results Test. For ongoing monitoring of your structured data, use tools like our Local Rank Checker to track how schema improvements affect your search visibility.

Frequently Asked Questions

What is WebSite schema markup?

WebSite schema markup is structured data in JSON-LD format that tells search engines about your website as a whole. It uses the Schema.org WebSite type to describe your site's name, URL, publisher, and search functionality. When Google reads this markup, it can display your site name correctly in search results and enable the sitelinks search box, which lets users search your site directly from the Google results page.

What is the sitelinks search box?

The sitelinks search box is a Google Search feature that displays a search input field directly beneath your website's main search result. When users type a query into this box, they are taken directly to your site's search results page. Google uses the SearchAction property in your WebSite schema to determine the URL template for your internal search. This feature increases user engagement by allowing visitors to search your content without first navigating to your homepage.

Is WebSite schema required for my site?

WebSite schema is not technically required, but it is strongly recommended for every website. Without it, Google has to infer your site name and search functionality from page content, which can lead to incorrect display. Adding WebSite schema ensures Google shows your preferred site name in search results, and the SearchAction property enables the sitelinks search box. The markup takes minutes to implement and provides lasting SEO benefits for your entire domain.

How do I set up the search action URL template?

The search action URL template tells Google how your site's internal search works. Find your site's search URL by performing a search on your site and examining the resulting URL. Replace the search query with the placeholder {search_term_string}. For example, if searching for "shoes" produces the URL https://example.com/search?q=shoes, your template would be https://example.com/search?q={search_term_string}. Common patterns include /search?q=, /search?s=, and /?s= for WordPress sites.