# Control indexing of facets and internal search

- Check 20.18 · E-commerce SEO · Critical
- Source: https://checklist-seo-geo.com/en/e-commerce-seo/control-indexing-facets-internal-search
- Set the intended state of each type of filter, sort and internal search URL, align robots.txt, noindex, canonical and sitemap, then monitor them every month.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/e-commerce-seo/control-indexing-facets-internal-search.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

A store generates URLs in bulk without anyone creating them: filters, sort orders, price ranges, internal search results pages. This check means setting the intended state for each family of URLs (indexable, excluded from the index, not crawled), checking that robots.txt, robots tags, canonical, sitemap and internal links all say the same thing, then checking every month that the index and crawling remain as intended. Decisions on which filter combinations deserve a page belong to [control filters and facets](https://checklist-seo-geo.com/en/architecture-navigation/control-filters-facets); here, you check and monitor how they are applied, and you deal with internal search.

## Why it matters

Google says it about facets: in their most common form, they generate a very large number of URLs that crawlers explore, at the cost of higher server load and slower discovery of useful pages. It recommends robots.txt to prevent crawling of unwanted filter URLs, and a 404 status code for combinations with no results. For crawl budget, it advises against relying on `noindex`, which the crawler has to fetch the page to read.

Internal search results pages pose the same problem, only worse: every word typed creates a URL, endlessly. They offer nothing a category does not do better, and they can be abused: third parties create links to `?s=` followed by advertising text to get those pages indexed under your domain. WordPress, Shopify and PrestaShop already partly exclude them by default; you need to check that nothing has undone this.

Finally, these settings degrade: a theme update removes a tag, a filter plugin changes the shape of the URLs, a robots.txt gets rewritten. Without regular checks, you discover the problem when the index holds ten times more URLs than the catalog. AI engine crawlers that respect robots.txt follow the same rules, which also keeps them from getting lost there.

## What it improves

- **Crawling**: crawlers spend their requests on categories and product pages. A strong effect beyond a few thousand products.
- **Indexing**: the index contains the pages you chose, without filter duplicates or search results.
- **Brand safety**: no indexed search pages with injected text.
- **Server load**: fewer listing computations for crawlers.
- **Diagnosis**: a monthly dashboard flags drift before it costs traffic.

## How to check

**1. What crawlers explore.** In the server logs, break down Googlebot's requests by URL family:

```bash
grep -i "googlebot" /var/log/nginx/access.log | awk '{print $7}' | awk '
  /[?&](s|q|search_query)=/ || /\/search|\/catalogsearch\// {f["search"]++; next}
  /[?&](orderby|sort_by|tri|order)=/ {f["sort"]++; next}
  /[?&](filter|min_price|max_price|prix)/ {f["filters"]++; next}
  /[?&]/ {f["other parameters"]++; next}
  {f["no parameter"]++}
  END {for (k in f) print f[k], k}' | sort -rn
```

Adapt the patterns to your platform. The “search” share should be close to zero, and the “filters” share limited to the combinations you have kept.

**2. What Google has indexed.** In Search Console, [Page indexing](https://search.google.com/search-console/index) report: open the reasons “Indexed, though blocked by robots.txt”, “Excluded by ‘noindex’ tag”, “Alternate page with proper canonical tag” and “Duplicate without user-selected canonical”, and look at the examples. Search or filter URLs under “Indexed” need fixing. The [Crawl stats](https://search.google.com/search-console/settings/crawl-stats) report gives examples of recently crawled URLs.

**3. What your pages say.** For one URL from each family:

```bash
for url in "https://example.com/?s=theiere&post_type=product" "https://example.com/thes/?orderby=price" "https://example.com/thes/the-vert/bio/"; do
  echo "== $url"
  curl -s -D - -o /tmp/page.html "$url" | grep -i -E "^HTTP|x-robots-tag"
  grep -i -o -E '<meta name="robots"[^>]*>|<link rel="canonical"[^>]*>' /tmp/page.html
done
```

Then test each URL in the [robots.txt report](https://search.google.com/search-console/settings/robots-txt) or with [URL Inspection](https://search.google.com/search-console?action=inspect).

## How to implement

### Before you start

Draw up the control matrix. Example for Thé des Lisières, a fictional shop running WooCommerce:

| URL family | Example | Intended state | robots.txt | Robots tag | Canonical | Sitemap | Internal links |
|---|---|---|---|---|---|---|---|
| Combinations kept | `/thes/the-vert/bio/` | Indexable | Allowed | `index` | Self-referencing | Yes | Yes, descriptive anchors |
| Other filters | `/thes/?filter_origine=chine` | Not crawled | `Disallow` | Not applicable | Not applicable | No | Optional, `nofollow` as a complement |
| Sort | `/thes/?orderby=price` | Not crawled | `Disallow` | Not applicable | Not applicable | No | No |
| Price | `/thes/?min_price=5` | Not crawled | `Disallow` | Not applicable | Not applicable | No | No |
| Pagination | `/thes/page/2/` | Crawled, indexable | Allowed | `index` | Self-referencing | No | Yes |
| Internal search | `/?s=sencha&post_type=product` | Not indexed, then not crawled | `Disallow` once deindexed | `noindex` | Not applicable | No | No crawlable links |

Consistency rules:

- **A URL blocked by robots.txt passes on neither its `noindex` nor its canonical.** If URLs from a family are already indexed, add `noindex`, wait for them to drop out of the index, then block them.
- **Never in the sitemap**: a URL that is blocked, set to `noindex` or canonicalized elsewhere. See [exclude redirects, errors and noindex pages](https://checklist-seo-geo.com/en/crawling/exclude-redirects-errors-noindex-pages).
- **Empty combination or search with no results**: a 404 for filters, as Google recommends; for internal search, the “no results” page can stay at 200 if it is set to `noindex` and blocked.
- **No crawlable links to search results**: no “popular searches” cloud, no suggestion links as `<a href>` to `?s=`. If an internal query comes up often, create a real category or a guide.

### WordPress

Versions: WordPress 6.5 and later (mechanism present since 5.7), WooCommerce 9 to 11.

Since version 5.7, WordPress adds `noindex` to search results pages on its own (the `wp_robots_noindex_search` filter, active by default); WooCommerce searches (`?s=…&post_type=product`) go through the same mechanism. Check that a plugin or the theme has not removed it. Once these pages are out of the index, block them along with the rest, in the robots.txt managed by your SEO plugin or a file at the root:

```txt
User-agent: *
Disallow: /*?s=
Disallow: /*&s=
Disallow: /search/
Disallow: /*?*orderby=
Disallow: /*?*min_price=
Disallow: /*?*max_price=
Disallow: /*?*filter_
Disallow: /*?*query_type_
```

Leave category URLs and the combinations you have kept, as clean paths, allowed.

### Shopify

Versions: Shopify admin and Online Store 2.0 themes, all plans, November 2026.

On the stores we observed, `/search` pages return an `X-Robots-Tag: noindex, nofollow` header; check yours with the command from the “How to check” section. The default robots.txt blocks sorted collections (`/collections/*sort_by*`), tag combinations (`/collections/*+*`) and, in its current version, URLs that combine several filters (`/collections/*filter*&*filter*`). A single filter remains crawlable.

To also block search and single filters, create the `robots.txt.liquid` template (`Online Store > Themes > Edit code > Add a new template > robots`) while keeping the default rules:

```liquid
{% for group in robots.default_groups %}
  {{- group.user_agent }}
  {%- for rule in group.rules -%}
    {{ rule }}
  {%- endfor -%}
  {%- if group.user_agent.value == '*' -%}
    {{ 'Disallow: /search' | prepend: '\n' }}
    {{ 'Disallow: /*/search' | prepend: '\n' }}
    {{ 'Disallow: /collections/*?*filter.' | prepend: '\n' }}
  {%- endif -%}
  {%- if group.sitemap != blank -%}
    {{ group.sitemap }}
  {%- endif -%}
{% endfor %}
```

Shopify warns that a mistake in this file can cost you all your traffic: test each rule before publishing.

### PrestaShop

Versions: PrestaShop 8 and 9, Faceted search module (ps_facetedsearch).

The robots.txt generated by PrestaShop (`Shop Parameters > Traffic & SEO`, button to generate the robots.txt file) already blocks the search controller and the `search_query`, `q` (facets from the faceted search module) and `order` parameters. Regenerate it after every module change, and check that a rule added by hand has not been overwritten. The combinations you keep must be categories, not `?q=` URLs.

### Magento

Versions: Magento Open Source and Adobe Commerce 2.4 (2.4.7 to 2.4.9).

Search results are served under `/catalogsearch/result/?q=…`. In `Content > Design > Configuration`, Global row (or store view), `Search Engine Robots` section, add to the custom instructions:

```txt
User-agent: *
Disallow: /catalogsearch/
Disallow: /*?*product_list_order=
Disallow: /*?*product_list_limit=
Disallow: /*?*product_list_mode=
Disallow: /*?*price=
```

Add the layered navigation attribute codes you do not want crawled (`/*?*color=`). Search terms redirected to pages (`Marketing > SEO & Search > Search Terms`) avoid leaving frequent searches without a dedicated page.

### Apache

Versions: Apache 2.4.

If the platform does not add `noindex` to search, add the header at server level, in the virtual host or `.htaccess` (requires `mod_headers`):

```apache
<If "%{QUERY_STRING} =~ /(^|&)s=/ || %{REQUEST_URI} =~ m#^/search/#">
    Header set X-Robots-Tag "noindex, follow"
</If>
```

Reload with `sudo apachectl configtest && sudo systemctl reload apache2`.

### Nginx

Versions: Nginx 1.24 and later.

```nginx
map $request_uri $search_robots_header {
    default "";
    ~^/search/ "noindex, follow";
    ~[?&]s= "noindex, follow";
}

server {
    add_header X-Robots-Tag $search_robots_header always;
}
```

An empty header is not sent. Be careful: an `add_header` in a `location` block cancels those inherited from the `server` block, unless you add `add_header_inherit merge;` there (Nginx 1.29.3 and later, so the 1.30 stable branch). Test, then reload with `sudo nginx -t && sudo systemctl reload nginx`.

### Cloudflare

Versions: Cloudflare dashboard, all plans, November 2026.

A response header transform rule adds `X-Robots-Tag` without touching the server: `Rules > Overview > Create rule > Response Header Transform Rule` ([rules overview](https://dash.cloudflare.com/?to=/:account/:zone/rules/overview)), with a condition on the `/search` path or a query string containing `s=`, a “Set static” operation on `X-Robots-Tag` with the value `noindex, follow`, then “Deploy”. The robots.txt, for its part, is still served by the origin.

### Laravel

Versions: Laravel 11 to 13.

A middleware applied to the search routes:

```php
class NoIndexResponse
{
    public function handle(Request $request, Closure $next): Response
    {
        $response = $next($request);

        $response->headers->set('X-Robots-Tag', 'noindex, follow');

        return $response;
    }
}
```

```php
Route::get('/recherche', [SearchController::class, 'index'])
    ->middleware(NoIndexResponse::class)
    ->name('search');
```

Normalize filters (consistent order, known values, a 404 for an empty combination) as described in the guide on facets.

### Next.js

Versions: Next.js 15 and 16 (App Router).

On the App Router search page:

```ts
export const metadata = {
  robots: { index: false, follow: true },
};
```

And in `app/robots.ts`, declare the blocked families:

```ts
import type { MetadataRoute } from 'next';

export default function robots(): MetadataRoute.Robots {
  return {
    rules: [{ userAgent: '*', allow: '/', disallow: ['/recherche', '/*?*tri=', '/*?*prix='] }],
    sitemap: 'https://example.com/sitemap.xml',
  };
}
```

Only add the search `disallow` rules once its pages are out of the index.

### Monitor every month

| Indicator | Source | Alert threshold (to set for your site) |
|---|---|---|
| Share of Googlebot requests on search and filters not kept | Server logs | A clear rise from one month to the next |
| Search or filter URLs under “Indexed” | Search Console, examples in the indexing report | Any appearance |
| Number of indexed pages compared with the number of intended pages | Search Console and inventory | A growing gap |
| robots.txt rules | Dated copy of the file | Any unplanned change |
| `noindex` on search | The curl check command | Missing |

Automate the last two checks in your continuous integration or a scheduled task. See [analyze server logs](https://checklist-seo-geo.com/en/crawling/analyze-server-logs) and [monitor indexing reports](https://checklist-seo-geo.com/en/indexing-canonicalization/monitor-indexing-reports).

## Common mistakes

- **Blocking already indexed URLs in robots.txt**: they stay in the index, and the `noindex` can no longer be read.
- **`noindex` and `Disallow` set at the same time** on indexed URLs, for the same reason.
- **Popular searches displayed as links** in the footer or on product pages: each link opens a search URL to be crawled.
- **Replacing `/robots.txt` on Shopify without keeping the default rules.**
- **An overly broad pattern** (`Disallow: /*?`) that also blocks pagination or the variant URLs used by merchant feeds.
- **Empty combinations returning 200** instead of a 404.
- **No more checks after setup**: a theme or plugin update undoes the settings without warning.

## Frequently asked questions

### Should an online store block its internal search pages?

Yes. Internal search results pages create one URL per word typed, offer nothing a category does not do better and can be abused to get unwanted text indexed under your domain. Keep them set to noindex until they drop out of the index, then block their crawling with robots.txt. If a search comes up often, create a real category or a guide.

### Noindex or robots.txt for filter URLs?

The two do not play the same role. Robots.txt prevents crawling, and it is the method Google recommends for unwanted filters; noindex removes a page from the index but forces the crawler to fetch it to read the tag. For URLs that are already indexed, add noindex first, wait for them to drop out of the index, then block them in robots.txt.

### Does Shopify index search pages and filters?

By default, Shopify's robots.txt blocks sorted collections, tag combinations and, in its current version, URLs that combine several filters; a single filter remains crawlable. On the stores we observed, /search pages return a noindex header. Check your store with curl, then supplement as needed with a robots.txt.liquid template that keeps the default rules.

### How can you tell whether Google is crawling too many facet URLs?

Analyze the server logs: count Googlebot's requests to filter, sort and search URLs, and compare them with requests to categories and product pages. Supplement this with Search Console's Crawl stats and indexing report. A large or growing share of requests on unwanted URLs signals a setting that needs fixing.

## Resources

- [Google Search Central: managing crawling of faceted navigation URLs](https://developers.google.com/search/docs/crawling-indexing/crawling-managing-faceted-navigation?hl=en)
- [Google Search Central: large site owner's guide to managing your crawl budget](https://developers.google.com/search/docs/crawling-indexing/large-site-managing-crawl-budget?hl=en)
- [Google Search Central: block search indexing with noindex](https://developers.google.com/search/docs/crawling-indexing/block-indexing?hl=en)
- [Shopify Help: editing robots.txt.liquid](https://help.shopify.com/en/manual/promoting-marketing/seo/editing-robots-txt)
- [WordPress: wp_robots_noindex_search](https://developer.wordpress.org/reference/functions/wp_robots_noindex_search/)
- [Adobe Commerce: SEO overview (search engine robots)](https://experienceleague.adobe.com/en/docs/commerce-admin/marketing/seo/seo-overview)
- [Next.js: robots file](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots)

Next steps: [handle internal search results with no SEO value](https://checklist-seo-geo.com/en/indexing-canonicalization/handle-internal-search-results-no-seo-value) and [avoid infinite URL spaces](https://checklist-seo-geo.com/en/architecture-navigation/avoid-infinite-url-spaces).
