You search Google for your brand and the headline above your homepage result shows the wrong site name — the bare domain, an old brand, or your full legal company name instead of the short name you want. You view source on the homepage and the WebSite JSON-LD block has values that don’t match the visible site: name says "My AI Site" but the logo and footer say “AI Productivity Guide.” Google reads WebSite structured data as the top-priority signal for the site name shown in search results, but only when its name matches what’s actually visible on the page.
Fastest fix: make the JSON-LD name byte-identical to your visible homepage branding (logo text, <title>, footer), confirm url is your canonical homepage, then request a recrawl of the homepage in Search Console (URL Inspection -> Request Indexing). The new name usually appears within a few days to a few weeks.
What still matters in 2026 (and what doesn’t)
WebSite JSON-LD used to do two jobs. Only one is still live:
| Feature | Status as of June 2026 | What to do |
|---|---|---|
| Site name (the brand line above your homepage result) | Active. WebSite.name is the highest-priority signal Google uses. | Keep it accurate — this is the whole reason the block matters now. |
Sitelinks search box (potentialAction / SearchAction) | Retired. Google removed it globally on November 21, 2024. | The markup is harmless but does nothing. Don’t spend time fixing the search-URL template for Google’s sake. |
That second row is the big change. If you came here to fix a broken SearchAction.target URL so the search box reappears, stop — there is no search box to fix. Google removed the sitelinks search box entirely, pulled its report out of Search Console, and stopped highlighting the markup in the Rich Results Test. Leaving the old potentialAction in your JSON-LD won’t trigger errors; it’s just inert. The rest of this guide focuses on the part that still drives a visible result: the site name.
Common causes
Ordered by how often they’re the real problem, highest first.
1. name uses an old / placeholder / generic brand
The starter template shipped with name: "My Site" and nobody updated it. Or you rebranded but the JSON-LD generator still emits the old name. Google also ignores names that are too generic (“Home”, “Blog”) or that read like a long legal entity (“Acme Productivity Solutions LLC”) instead of a short brand.
How to spot it:
curl -s https://yoursite.com/ | grep -oP '"@type":"WebSite"[\s\S]+?</script>' | grep -oP '"name":"\K[^"]+'
If the output differs from your visible logo / footer name, or it’s a generic word, this is your problem.
2. name doesn’t match the visible homepage branding
This is the cause Google itself calls out most. Your structured data says “AI Productivity Guide” but the <title> says “Home | AIPG”, the og:site_name says “AI Prod Guide”, and the logo alt text says something else again. When the signals disagree, Google often falls back to the domain.
How to spot it: Compare four values on the homepage — they should be the same short string:
curl -s https://yoursite.com/ | grep -oE '<title>[^<]+|og:site_name" content="[^"]+|"name":"[^"]+'
3. url has a trailing-slash mismatch with the canonical
JSON-LD: "url": "https://yoursite.com". Canonical: https://yoursite.com/. Google sees two slightly different URLs claimed as the site root. WebSite.url must point to your canonical homepage at the domain (or subdomain) root.
How to spot it: Compare WebSite.url to your homepage rel="canonical". They should be byte-identical, redirect-free.
4. WebSite structured data is on a subdirectory, not the domain/subdomain root
Site names only work at the domain or subdomain root. If your “site” lives at yoursite.com/blog/ and that’s where you put the WebSite block, Google won’t pick up a per-subdirectory name — subdirectory site names aren’t supported. Use a subdomain if you need a distinct name.
How to spot it: Confirm the WebSite block is on the page served at the bare root (/ or the locale root like /en/), not on an inner path.
5. inLanguage doesn’t match <html lang>
JSON-LD: "inLanguage": "en". HTML: <html lang="en-US">. Minor, but worth aligning so the two don’t contradict each other.
How to spot it:
curl -s https://yoursite.com/ | grep -oE '<html[^>]+lang="[^"]+"|"inLanguage":"[^"]+"'
6. Multiple WebSite blocks on the same page
Some templates emit WebSite from a layout file AND from a separate site-level schema component. Google sees two blocks for one site; if their name values disagree, the signal is muddied.
How to spot it:
curl -s https://yoursite.com/ | grep -c '"@type":"WebSite"'
More than 1 means a duplicate. Pick one source, remove the other.
7. @id references a legacy domain
"@id": "https://yoursite.com/#website" is fine. "@id": "https://oldsite.com/#website" is a leftover from a domain migration and should be corrected.
How to spot it: Check @id for a legacy domain or a malformed value.
8. New domain with weak brand recognition
If the domain is young, Google leans on off-page signals it doesn’t have yet and may show the bare domain no matter what your markup says. The fix is alternateName plus patience (see Step 4 below).
Shortest path to fix
Step 1: Define one source of truth
In site.config.mjs or equivalent:
export const SITE = {
name: "AI Productivity Guide", // short, brandable, matches the logo
url: "https://yoursite.com", // canonical homepage, no trailing-slash drift
inLanguage: "en", // or "en-US" to match <html lang>
};
Step 2: Generate the WebSite block from it — on the homepage only
---
import { SITE } from '../site.config.mjs';
const isHomepage = Astro.url.pathname === '/' || Astro.url.pathname === '/en/';
---
{isHomepage && (
<script type="application/ld+json" set:html={JSON.stringify({
"@context": "https://schema.org",
"@type": "WebSite",
"@id": `${SITE.url}/#website`,
"url": SITE.url,
"name": SITE.name,
"inLanguage": SITE.inLanguage,
})}></script>
)}
Note what’s gone: there’s no potentialAction / SearchAction. It no longer does anything (see the table above), so the cleanest block omits it. If you keep an existing one it won’t hurt, but new markup doesn’t need it.
Step 3: Align the four visible signals
On the homepage, these should all be the same short string:
<title>(or at least the site-name part of it),- the
og:site_namemeta tag, - the logo’s
alttext / the text next to the logo, - the
WebSiteJSON-LDname.
Disagreement here is the single most common reason Google shows the domain instead of your name.
Step 4: Add alternateName if the name still won’t stick
If the right name is ignored — common on newer domains — give Google fallbacks. List them in order of preference, and for a young site include the bare domain as a last resort:
{
"@type": "WebSite",
"name": "AI Productivity Guide",
"alternateName": ["AIPG", "yoursite.com"],
"url": "https://yoursite.com"
}
Do not use alternateName to smuggle in a name Google is actively rejecting elsewhere — it has to be consistent with your real branding or it’s ignored too.
Step 5: Remove duplicate WebSite blocks
grep -rn 'WebSite' src/layouts src/components
Keep one source. Delete the rest.
Step 6: Validate the markup
After deploy, open the homepage in the Rich Results Test or the Schema Markup Validator. Confirm the WebSite type parses with no errors and the name is what you expect. (The Rich Results Test no longer flags a sitelinks search box — that’s expected, not a failure.)
Step 7: Request a recrawl, then wait
In Search Console, run URL Inspection on your homepage URL and click Request Indexing. Site-name changes are not instant: Google has to recrawl and reprocess the homepage, which takes anywhere from a few days to several weeks. There is no Search Console report for the site-name feature, so the only way to confirm is to search for your brand once recrawl completes.
How to confirm it’s fixed
- Markup parses: Rich Results Test / Schema Markup Validator shows
WebSitewith your intendednameand no errors. - One block, consistent values:
grep -c '"@type":"WebSite"'on the live homepage returns1, andname,<title>,og:site_name, and logo text all read the same short brand. - Recrawl done: URL Inspection shows the homepage’s last crawl date is after your deploy.
- The SERP updates: a few days to a few weeks later, searching your brand shows the correct site name above the homepage result.
When this is not on you
Even with perfect WebSite JSON-LD, Google’s site-name selection is fully automated and weighs off-page signals you can’t directly control. A brand-new domain with few external mentions may keep showing the bare domain for a while regardless of markup. And the sitelinks search box is simply gone as of November 2024 — no amount of correct SearchAction markup brings it back, because the feature itself was retired across Search globally.
FAQ
- Should I delete my old
SearchAction/potentialActionmarkup? You don’t have to. It’s inert and won’t cause Search Console errors. New markup can just omit it. - Why does Google show my domain instead of my site name? Usually a mismatch (Cause 2) or a name that’s too generic / too long (Cause 1). Align the four visible signals, add
alternateName, and request a recrawl. - How long until the new name appears? A few days to several weeks after Google recrawls the homepage. Requesting indexing in URL Inspection speeds up the crawl, not Google’s processing.
- Is there a Search Console report for site name? No. Google removed the sitelinks-search-box report and never added one for site names — verify by searching your brand.
- Can I declare more than one
WebSiteblock per page? No. Use exactly one on the homepage; conflicting blocks muddy the name signal.
Prevention
- Single
SITEconfig as the source of truth for name and canonical URL. - Emit
WebSiteJSON-LD only on the homepage (or the locale’s homepage for bilingual sites). - CI assertion that the homepage has exactly one
WebSiteblock and that itsnameequals your configured brand. - Update the
WebSitenamewhenever you rebrand, and request a homepage recrawl afterward. - Don’t add
SearchActionto new markup — it no longer renders anything in Google Search.
Related
Tags: #SEO #Troubleshooting #Debug #Structured data #WebSite schema #JSON-LD