How to Fix Missing WebSite Schema (JSON-LD Guide)

This check fails when none of the crawled pages contains structured data with the type WebSite. By the end of this guide you will have a valid WebSite JSON-LD block on your homepage (and ideally every page) that declares your site name, canonical URL and, optionally, your on-site search URL.

By Updated ⏱ 15 minutes🎯 Beginner● Low impactTechnical
Illustration: WebSite schema fix guide
TECHNICAL · FIX GUIDE WebSite schema IMPACTEFFORT TIME15 minutes LEVELBeginner

Why it matters

Google uses WebSite markup on the homepage as its strongest signal for the site name it shows above your URL in search results. Without it, Google may guess and show your domain or an outdated brand name. AI answer engines and knowledge-graph builders also read the name and alternateName properties to tie your domain to your brand.

The impact on rankings is small, but the fix takes minutes.

✕BeforeHomepage source has no <scripttype="application/ld+json"> containing"@type": "WebSite", so the audit✓AfterHomepage <head> contains a WebSiteJSON-LD block with name, url and aSearchAction, and the audit reports

What you need

Access to your site's theme, layout template or SEO plugin settings
Your preferred site name and canonical homepage URL (https, with or without www as you actually use it)
Your on-site search results URL pattern, if you have site search
A browser to test with validator.schema.org

Step-by-step fix

1

Check whether WebSite markup already exists

Open your homepage, press Ctrl+U (Cmd+Option+U on Mac) to view source, and search for "WebSite". Many SEO plugins and themes already output it inside an @graph array. If you find it, confirm it is not wrapped in a comment or injected only after user interaction, then skip to the validation step.

If it is missing, continue.

Pro tip: Search for both `"@type":"WebSite"` and `"@type": "WebSite"` since spacing varies between generators.
2

Decide your name, URL and search pattern

Pick the exact site name you want Google to show, usually your brand (Example Co), not a slogan. Use the canonical homepage URL with a trailing slash. Run a search on your own site and copy the results URL to find the query pattern:

  • Custom sites: often /search?q=
  • WordPress: /?s=
  • Shopify: /search?q=
Pro tip: Add an alternateName (an acronym or shorter variant) if people commonly search for your brand that way.
3

Write the WebSite JSON-LD block

Fill in this template with your values. The name and url properties are what matter for site names. org and some other consumers read it.

Only include it if your search URL actually works.

html
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "Example Co",
  "alternateName": "ExampleCo",
  "url": "https://example.com/",
  "potentialAction": {
    "@type": "SearchAction",
    "target": "https://example.com/search?q={search_term_string}",
    "query-input": "required name=search_term_string"
  }
}
</script>
Pro tip: The placeholder inside `target` must match the name in `query-input` exactly (`search_term_string` in both places).
4

Add it to the <head> of your homepage template

Paste the block inside <head> in the template that renders your homepage, or in the global layout so it appears on every page. Google only needs it on the homepage for site names, but a global layout is simplest and ensures any crawled page carries it. Make sure it is in the server-rendered HTML, not added later by a tag manager.

html
<head>
  <meta charset="utf-8">
  <title>Example Co</title>
  <!-- WebSite JSON-LD here -->
</head>
Pro tip: If you already output Organization markup, keep them as separate blocks or combine both in one @graph array; either is valid.
5

Remove duplicate or conflicting WebSite blocks

If a plugin and your theme both output WebSite markup with different names, Google may pick the wrong one. Keep one source of truth: either disable the theme's markup or turn off the plugin's schema output, then make sure the name matches your homepage <title> and og:site_name.

html
<meta property="og:site_name" content="Example Co">
6

Validate and recrawl

Paste your homepage URL into validator.schema.org and confirm a WebSite item appears with no errors. Then re-run the audit. In Google Search Console, use URL Inspection on the homepage and click Request Indexing so the new site name is picked up sooner.

text
curl -s https://example.com/ | grep -o '"@type": *"WebSite"'
Pro tip: Site name changes in Google can take several weeks to appear even after the markup is correct.

Platform-specific notes

WordPress

Yoast SEO and Rank Math both output WebSite inside an @graph automatically. In Yoast, set the name under Yoast SEO → Settings → Site basics (Website name and Alternate website name). In Rank Math, set it under Rank Math → Titles & Meta → Local SEO. WordPress search uses https://example.com/?s={search_term_string}. Without a plugin, add the block to your child theme's header.php before </head> or hook it into wp_head.

Shopify

Many Dawn-based themes already print WebSite JSON-LD on the homepage from sections/header.liquid. If yours does not, go to Online Store → Themes → … → Edit code → layout/theme.liquid and paste the block before </head>, using {{ shop.name }} and {{ shop.url }} for the values. Shopify search is /search?q=.

Next.js

In the App Router, render the object in app/layout.tsx (or app/page.tsx for homepage only) with <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }} />. Avoid next/script with lazy strategies, which can keep it out of the initial HTML.

Wix

Go to the page's SEO settings (Pages menu → ⋯ → SEO basics → Advanced SEO → Structured data markup) and add the JSON without the <script> tags. Wix already generates some default markup, so check the source first to avoid duplicates.

Webflow

Add the full <script> block in Site settings → Custom code → Head code for every page, or in the homepage's Page settings → Custom code → Inside <head> tag. Custom code only goes live after you publish.

Check that it worked

✅ How to verify

  • View the homepage source and confirm a JSON-LD block contains "@type": "WebSite" with your name and url.
  • Run the homepage through validator.schema.org and check the WebSite item shows zero errors and warnings.
  • Use Search Console URL Inspection → View crawled page → HTML to confirm Google sees the markup.
  • Re-run the audit and confirm it reports "WebSite schema found."

⚠️ Common mistakes

  • Injecting the markup through Google Tag Manager, so it is missing from the HTML the crawler fetches.
  • Using a SearchAction target that returns a 404 or ignores the query parameter.
  • Setting name to a slogan or a keyword-stuffed phrase instead of the actual brand name.
  • Leaving two WebSite blocks with different names from a theme and an SEO plugin.

Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.

Check my site free

FAQ

Is WebSite schema still useful after Google removed the sitelinks search box?

Yes. Google dropped the sitelinks search box in November 2024, but it still uses WebSite markup on the homepage to choose the site name shown in results. The SearchAction part is now optional.

Does WebSite schema need to be on every page?

Google only reads it from the homepage for site names. Putting it in your global layout is harmless and simpler to maintain.

What is the difference between WebSite and Organization schema?

WebSite describes the site itself (name, URL, search). Organization describes the company behind it (logo, contact details, social profiles). Most sites should have both.

Why is Google still showing the wrong site name?

Check that the name in WebSite markup matches your homepage title and og:site_name, that there is only one WebSite block, and that the markup is on the canonical homepage URL. Updates can take weeks.