Skip to content

Generated JSON-LD

Enter your site name and homepage URL, or click “load example”, to generate WebSite JSON-LD.

This tool checks one thing. Our audit checks 190+.

DarnItSEO Audit scans your entire site and writes the fix instructions for every issue it finds. Included in every yearly plan.

What WebSite markup is for now

For years, WebSite structured data was mostly known for one thing: the sitelinks search box, a small search field Google showed under some brands' homepage results. Google retired that search box worldwide in November 2024, and the markup that powered it no longer makes anything appear. That leaves WebSite markup with a different, and arguably more useful, job: telling Google what your site name is.

The site name is the label Google shows above the URL in each search result, next to your favicon. When Google cannot tell what your site is called, it falls back to the domain ("fernwoodgarden.com") or picks a phrase from your title tags, which may be a product line or a slogan rather than your brand. WebSite markup on the home page is the main way you can state your preferred name directly. This generator builds that block, with the old SearchAction available only as a clearly labelled optional extra.

How Google chooses a site name

Google's system looks at several sources and picks the name it thinks best represents the site, drawing on WebSite structured data, the title tag of the home page, headings, og:site_name and other prominent text. Structured data does not force a name, but it is the strongest signal you control. The other signals should agree with it. If your markup says "Fernwood Garden Supply" but your home page title says "Seeds, Bulbs & Tools | Shop Online", you are sending two answers to one question.

If the name you want is not chosen, alternateName gives Google fallbacks in order of preference: a shorter form, an acronym, or the name with a qualifier. Google may use one of those rather than reverting to the bare domain.

The properties that set your site name

The site name documentation is short, which is part of its appeal:

  • name (required): the name of the site. Use the brand people know, not a description or a tagline.
  • url (required): the URL of the home page, at the domain or subdomain root.
  • alternateName (recommended): one or more alternative names, such as an acronym or shorter version, in order of preference.

The generator also offers inLanguage and an optional publisher link. Neither is needed for site names, but the publisher reference is a tidy way to connect this block to your Organization markup through a shared @id, so search engines read them as one entity rather than two unrelated descriptions.

A home page WebSite block

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "@id": "https://www.fernwoodgarden.com/#website",
  "name": "Fernwood Garden Supply",
  "alternateName": ["Fernwood", "FGS"],
  "url": "https://www.fernwoodgarden.com/",
  "inLanguage": "en-US",
  "publisher": { "@id": "https://www.fernwoodgarden.com/#organization" }
}
</script>

Paste this into the head of your home page only. The publisher line works when your Organization block uses https://www.fernwoodgarden.com/#organization as its @id, which is what our Organization Schema Generator outputs. If you do not have Organization markup yet, choose "No" for that option.

Home pages, subdomains and subdirectories

Site names apply at the domain and subdomain level. Google supports a name for example.com and a separate name for shop.example.com, each declared on its own home page. It does not support distinct site names for subdirectories, so example.com/blog/ cannot have its own name; it inherits the domain's. That is why the generator raises an error if the URL you enter has a path. The markup also does nothing on inner pages, so there is no benefit in adding it site-wide.

What happened to the sitelinks search box?

Google announced in October 2024 that it would stop showing the sitelinks search box, and it disappeared from results worldwide in November 2024. Google also said that leftover SearchAction markup causes no problems: it will not trigger errors in Search Console and you do not need to remove it. The structured data report for it was retired at the same time.

So should you add SearchAction now? For Google, there is no reason to. It is still valid schema.org vocabulary, and other consumers may read it, which is why this tool keeps it as an opt-in extra rather than dropping it. If you enable it, the generator produces the standard block:

"potentialAction": {
  "@type": "SearchAction",
  "target": {
    "@type": "EntryPoint",
    "urlTemplate": "https://www.fernwoodgarden.com/search?q={search_term_string}"
  },
  "query-input": "required name=search_term_string"
}

The urlTemplate must contain {search_term_string} exactly where the query goes, and the query-input value must name the same placeholder. To find your pattern, search your own site and replace the words you typed in the results URL with the placeholder.

Placing the block on your home page

WordPress

Yoast SEO and Rank Math already output a WebSite node from your site title (Settings, General, Site Title in WordPress, and the "site name" field in the plugin). Set the site name and alternate name there; Yoast has a dedicated "Alternate website name" field. Only paste this generator's code if your theme or setup outputs no WebSite markup, otherwise you end up with two blocks naming the site differently.

Shopify

Some Shopify themes include a WebSite block in theme.liquid. Search the theme code for "WebSite". Edit that block to use your preferred name, or replace it with the generated code inside {% if template == 'index' %} so it prints on the home page only.

Google Tag Manager

Add a Custom HTML tag with the script, fire it on Page View where Page Path equals /, and publish. Because site names are chosen from the home page, a server-rendered block is safer, but GTM works if you cannot touch the template. Check the rendered HTML with URL Inspection afterwards.

When Google still shows the wrong name

Adding correct markup does not always change the name straight away, and sometimes Google keeps choosing something else. Work through these in order:

  • Check that Google has seen the change. Use URL Inspection on the home page and look at the crawled HTML for your WebSite block. If the last crawl predates your edit, request indexing and wait.
  • Check every version of the home page. If http, https, www and non-www versions exist, the markup belongs on the canonical one, and the others should redirect to it.
  • Align the supporting signals. Put the same name in the home page title tag (at the start), the main heading or logo alt text, and og:site_name.
  • Add an alternateName. If your main name is generic or shared with another site, Google may refuse it. A distinctive fallback such as the domain-style name ("FernwoodGarden") or an acronym gives it an acceptable option.
  • Check for a second block. A theme, plugin or tag manager may be printing another WebSite object with a different name.

Google's documentation also notes that site names are chosen automatically, and that the domain name may be shown when no better option is found. Getting there can take a few weeks after the home page is recrawled, so give it time before changing the name again; repeated changes only reset the process.

Site name mistakes that keep the domain showing

  • Using a title, not a name. "Fernwood | Garden Tools, Seeds & Bulbs" is a title tag. The site name is "Fernwood Garden Supply".
  • Inconsistent signals. Different names in the markup, home page title, logo text and og:site_name make Google less likely to use yours.
  • Markup on a subdirectory home page, which is not supported.
  • Duplicate WebSite blocks from a plugin and a theme with different names.
  • A generic or shared name. Google avoids names that are not unique to the site, such as "Home" or a common word; alternateName gives it a distinctive fallback.
  • Expecting a search box. SearchAction no longer creates one, so do not spend time debugging why it is not showing.

Site name changes can take time to appear because Google needs to recrawl the home page. Request indexing of the home page in Search Console after publishing to speed that up. While you wait, pair the block with an Organization schema entity for the publisher reference, check that og:site_name says the same thing with the Open Graph Preview, and make sure the favicon shown next to the name loads with the Favicon Checker. Our schema markup guide covers the rest of a site-wide structured data setup.

How it works

  1. Enter Your Site Name

    Add the name you want Google to show, any alternate names, and your home page URL. Checks flag titles used as names and non-home-page URLs.

  2. Connect and Extend

    Optionally link the block to your Organization markup with a shared @id, or add a SearchAction, which is valid but no longer shows a search box in Google.

  3. Copy to Your Home Page

    Copy the script tag or download the .json and paste it once into your home page <head>, then request indexing in Search Console.

Frequently asked

What does WebSite schema do now?

›

It tells Google your site name: the label shown above the URL in every search result. Without it Google may show your bare domain or a phrase from your title tags instead of your brand. Google's site name documentation requires name and url and recommends alternateName.

Does WebSite schema still create a sitelinks search box?

›

No. Google retired the sitelinks search box worldwide in November 2024. SearchAction markup is still valid schema.org and causes no errors, so this generator offers it as an optional extra, clearly labelled, but it will not make a search box appear in Google.

Where should WebSite schema go?

›

On your home page only, at the domain or subdomain root (example.com or shop.example.com). It does nothing on inner pages, and Google does not support separate site names for subdirectories such as example.com/blog/.

What should I put in alternateName?

›

Shorter or alternative names people use for your site, in order of preference: an acronym, a short form, or a domain-style version. Google may use one of these if it decides not to use your main name, rather than falling back to the bare domain.

Why is Google still showing the wrong site name?

›

Usually because other signals disagree with the markup (home page title tag, headings, og:site_name), because Google has not recrawled the home page yet, or because the name is generic. Make the signals consistent, add an alternateName, and request indexing of the home page in Search Console.

How is this different from the Sitelinks Searchbox Generator?

›

This tool is for the site name feature, which Google actively uses. The Sitelinks Searchbox Generator focuses on the SearchAction part only, which no longer produces a Google search box. If you want site name markup with an optional SearchAction, use this one.

Should WebSite and Organization schema be connected?

›

It helps. Give your Organization block an @id such as https://example.com/#organization and set publisher in the WebSite block to that same @id. This generator can add that link, and our Organization Schema Generator uses the same @id pattern.

Related tools

More Schema Markup tools

See all Schema Markup tools · All free SEO tools

Related guides

↳ full site audit190+ checks · AI fix instructions · yearly plans