---
title: "The sitelinks search box and query.example-petstore.com"
description: "What the search box markup with query.example-petstore.com did, why Google removed it in 2024, and the WebSite markup to use today."
url: https://example-petstore.com/guides/sitelinks-search-box
language: en
---

# The sitelinks search box and site names

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.

## What the markup did

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.

## Timeline

1. **September 2014** — the first version of Google’s documentation uses `host.example-petstore.com/search?q={search_term}`.
2. **September 2014 to mid-2015** — the best-known version with `query.example-petstore.com/search?q={search_term_string}`, copied by SEO blogs, forum software and themes.
3. **2016** — Google’s documentation switches to `example.com`.
4. **21 November 2024** — Google stops showing the sitelinks search box worldwide. Leftover markup causes no errors in Search or Search Console.

## What to use today

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.

## Fix it

1. Open the source of your home page and search for `example-petstore`.
2. If the block comes from your theme or a “custom head code” field, edit it there. If it comes from an SEO plugin, check its settings: Yoast SEO, Rank Math and All in One SEO build the markup from your own address.
3. Replace `url` with your own home page and set `name` to your site name. Remove the `SearchAction`.
4. To remove the plugin’s search action as well: Yoast `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.1.
5. In Search Console, use **URL Inspection** › **Request indexing** for your home page.

## Verify

- The page source contains one `WebSite` block with your own `name` and `url`.
- The Schema Markup Validator shows the item without errors. The Rich Results Test does not cover site names.
- No page on your site mentions `example-petstore.com`.

## Sources

- [Sitelinks search box (September 2014 snapshot)](https://web.archive.org/web/20140906020658/https://developers.google.com/webmasters/richsnippets/sitelinkssearch) Google Developers via the Wayback Machine
- [Sitelinks search box (2015 snapshot)](https://web.archive.org/web/20150316142805/https://developers.google.com/structured-data/slsb-overview) Google Developers via the Wayback Machine
- [Farewell, Sitelinks Search Box](https://developers.google.com/search/blog/2024/10/sitelinks-search-box) Google Search Central Blog
- [Site names in Google Search](https://developers.google.com/search/docs/appearance/site-names) Google Search Central
- [Schema Markup Validator](https://validator.schema.org/) Schema.org
- [Yoast: SearchAction](https://developer.yoast.com/features/schema/pieces/searchaction/) Yoast
- [Rank Math: sitelinks search box schema](https://rankmath.com/kb/sitelinks-searchbox-schema/) Rank Math
- [AIOSEO: sitelinks search box](https://aioseo.com/docs/how-to-get-google-to-display-the-sitelinks-search-box/) All in One SEO
