Aarunya AppsAarunya Apps
🌐Sitelinks search box

WebSite Schema — JSON-LD for Sitelinks Search Box

WebSite schema is essential for enabling the Sitelinks Search Box in Google — a search field that appears beneath your result for branded searches, letting users search your site directly from Google. It also provides Google with confirmed canonical information about your site.

What Google shows

A search box beneath your homepage result for branded queries (e.g., 'amazon' shows an Amazon search box in Google). Also: site name and logo in Google's knowledge graph.

Example JSON-LD

{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "Acme Corp",
  "url": "https://www.acme.com",
  "sameAs": [
    "https://twitter.com/acmecorp",
    "https://linkedin.com/company/acmecorp"
  ],
  "potentialAction": {
    "@type": "SearchAction",
    "target": {
      "@type": "EntryPoint",
      "urlTemplate": "https://www.acme.com/search?q={search_term_string}"
    },
    "query-input": "required name=search_term_string"
  }
}

Required by Google

  • *url
  • *name
  • *potentialAction (SearchAction) to enable sitelinks search

Recommended

  • sameAs (social media profiles)
  • description
  • publisher

When to use WebSite schema

All websites

Every website should have WebSite schema on its homepage — it provides canonical site information to Google and enables sitelinks search for larger sites.

E-commerce sites

The Sitelinks Search Box lets users search your product catalogue directly from Google — a significant UX advantage for brand searches.

Content sites and blogs

WebSite schema with SearchAction lets visitors search your article archive directly from branded Google searches.

Frequently Asked Questions

Where should WebSite schema be placed?

Add WebSite schema only to your homepage (the URL matching the 'url' field). Adding it to every page is unnecessary — once on the homepage is sufficient.

Will WebSite schema guarantee a sitelinks search box?

No — Google decides independently whether to show the Sitelinks Search Box based on site size, brand search volume, and technical correctness. WebSite schema with SearchAction is required but not sufficient on its own.

What endpoint should the SearchAction target?

The 'target' URL should be your site's search results page, with the query parameter placeholder: 'https://www.example.com/search?q={search_term_string}'. The placeholder must match exactly.

🔍

Validate in Google Rich Results Test

Paste the JSON-LD above to confirm it qualifies for rich snippets.

Test in Google →