Google Analytics · Tag Manager
From Classic Analytics to Google Analytics 4
Remove _setDomainName, _link and _linkByPost code, install the Google tag, and set up cross-domain measurement and unwanted referrals the current way.
Guide · Structured data
Thousands of sites copied Google’s sitelinks search box example with query.example-petstore.com as the search address. The feature is gone, but the markup is still around. This guide explains what it did and what to use instead.
Google could show a search box directly below a site’s result. A site asked for it with a WebSite block
containing a SearchAction. Whatever a searcher typed replaced {search_term_string} in the
target, and Google sent them to that address: the site’s own search results page.
{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "https://www.example-petstore.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://query.example-petstore.com/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
In Google’s example, query.example-petstore.com was the made-up address of the pet store’s search page.
It never existed. Even in 2014, Google required the target to be on the same domain as the site, so the example
target could never work for anyone else’s site.
host.example-petstore.com/search?q={search_term}, until late September 2014.query.example-petstore.com/search?q={search_term_string}, copied by SEO blogs, forum software and themes.example.com.The SearchAction no longer has a visible effect in Google Search. A WebSite block with your
own name and address still helps Google choose the site name shown in results. Put it on your home page only:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "Your site name",
"url": "https://www.example.com/"
}
</script>
You may add alternateName for a common short name. Leave out potentialAction, or point it at
your own search page if another consumer still uses it.
example-petstore.url with your own home page and set name to your site name. Remove the SearchAction.add_filter( 'disable_wpseo_json_ld_search', '__return_true' );, Rank Math filter rank_math/json_ld/disable_search, All in One SEO Search Appearance › Advanced › Enable Sitelinks Search Box off. SEOPress removed it in version 8.4 (December 2024).WebSite block with your own name and url.example-petstore.com.