E-commerce
Faceted search: which filters to index and which to block
Faceted search is decided on URLs: a few indexable combinations, the rest closed. Filter arithmetic, canonical, noindex, accessibility and real blocks.
Faceted search starts from one decision: which URLs may enter the index. Filters, counts, parameters and sitemaps all follow from that answer, and without it the shop generates thousands of near-identical pages.
The trap is arithmetic. Twelve colours, eight sizes, five price bands and four sort orders make 1,920 combinations for a single category. Ten categories make 19,200 URLs showing the same products in a different order, and the crawler spends its budget without finding anything new.
Choosing the facets that deserve an index
| Facet | Indexable | Why |
|---|---|---|
| Brand | Yes, one page per brand | People search for the manufacturer name |
| Colour | One combination per category, no more | "black shoes" gets searched, "black shoes size 42" almost never |
| Size | No | Huge combinations and no demand of their own |
| Price | A "under 50" page can exist | The filter helps the interface, not as thousands of URLs |
| Sort order | No | Duplicates the same list in four orders |
| Page 2, 3, 4 | Yes, canonical to the first | Pagination is not a facet and needs its own handling |
| Internal search | No | Results per query are infinite by definition |
Three ways to close the combinations
- robots.txt stops crawling, but a blocked URL is never read: the noindex inside that page will never be seen.
- noindex, follow on the combinations: the page stays reachable, links are followed, the URL stays out of the index.
- canonical to the category when the combinations are variants of the same list: a weaker signal, useful when pages must stay crawlable.
- One rule for the whole site: if the same combination is sometimes useful and sometimes not, the rule is wrong.
Readable, stable URLs
"/shoes/black" can be linked; "/shoes?colour=black&size=42&sort=price&page=3" changes as soon as the user touches a filter. Parameters stay for combinations that must not be indexed, while the chosen facets get a path. Parameter order needs normalising, otherwise the same list produces different URLs and duplicates itself.
# quante URL con parametri finiscono in sitemap
curl -s https://www.esempio.it/sitemap.xml | grep -c "?"
# quale canonical dichiara una pagina filtrata
curl -s "https://www.esempio.it/scarpe?colore=nero" | grep -o '<link rel="canonical" href="[^"]*"'
# la combinazione è chiusa ai crawler
curl -s https://www.esempio.it/robots.txt | grep -i "?"
The filter interface
A filter works from a keyboard or it does not work. fieldset and legend for each group, the selected state announced, the result count in a region with aria-live, an always visible "clear filters" button and no layout shift when the response arrives. Directive (EU) 2019/882 on the accessibility of products and services applies to e-commerce services from 28 June 2025: filters fall inside its scope.
Blocks from the catalogue
The sidebar category with 27 blocks covers the filter panel, the table category with 13 blocks the result list, the input components the checkboxes and price ranges, and the faq category with 24 blocks the questions about sizes and returns. The licence is the one the publisher declares on the record.
The limitation to state
The catalogue holds no search engine: no index, no ranking, no counts. The blocks are interface for the panel and for the list. Even the best rule remains a product decision: with forty products facets are a luxury, with four thousand they are necessary, and they need an index that answers in under a second.
Where to continue
The choice between canonical and noindex is in canonicalisation, splitting the index in sitemap index or a single sitemap, connecting categories and products in internal links. If the choice is between two frontend stacks, the comparison is in Next.js or Vite for a marketing site.
Frequently asked questions
What are facets in e-commerce?
They are the filters that narrow a list by attribute: colour, size, brand, price. They become an SEO problem when every combination generates a URL, because the number explodes and the pages are near-identical.
Which facets should be indexed?
Only those with demand of their own, usually brand and one combination per category. Size, sort order and pagination have no demand and create duplicates. Everything else stays reachable but out of the index.
noindex or robots.txt for filtered pages?
It depends on the goal. noindex keeps the page crawlable and removes it from the index; robots.txt blocks crawling and hides the noindex as well. For combinations you want excluded, the safer choice is noindex, follow.
Do filtered pages need a canonical?
Yes, pointing at the category or at the nearest indexable combination. A canonical pointing at itself on a duplicate combination fixes nothing. Pagination is a separate case: usually canonical to the first page.
How many URLs can a filter generate?
The product of the options: 12 colours, 8 sizes, 5 price bands and 4 sort orders make 1,920 URLs for one category. Ten categories make 19,200 near-identical pages. Do the sum before opening facets, not after.