How to fix faceted url indexable on Next.js (Headless)
Point the rel=canonical on every faceted/filter URL to its clean parent category URL (or add noindex), so Google treats filtered pages as a single authoritative page instead of thousands of duplicates.
Steps for Next.js (Headless)
- Identify your category/collection route file — typically `app/[...category]/page.tsx` (App Router) or `pages/[...category].tsx` (Pages Router). Faceted filter state is usually carried in URL search params (e.g. `?color=red&size=M`) or as extra path segments.
- In the App Router, export a `generateMetadata` function. Detect whether the current request URL contains any filter/facet params (or extra path segments beyond the base category slug). If it does, set `alternates.canonical` to the clean category URL (strip all query params and facet path segments). If it does not, set canonical to itself.
- In the Pages Router equivalent, use `next/head` inside the page component and render a `<link rel='canonical' href={canonicalUrl} />` using the same clean-URL logic.
- Optionally, for deeply-nested or purely parameter-driven faceted pages you never want indexed, add `robots: { index: false, follow: true }` (App Router) or `<meta name='robots' content='noindex,follow' />` (Pages Router) alongside the canonical — belt-and-suspenders protection.
- Ensure `generateStaticParams` (or `getStaticPaths`) does NOT enumerate faceted filter combinations — only emit paths for real category pages, so filtered URLs are never accidentally pre-rendered as standalone pages.
- Verify the fix with `curl -s https://your-domain/category/shirts?color=red | grep canonical` and confirm the canonical points to `/category/shirts`, not the filtered URL.
What is faceted url indexable?
When shoppers filter or sort products on a category page — by color, size, price, rating, etc. — your store usually generates a new URL for each combination (e.g., `/womens-pants?color=navy&size=S`). A "self-canonical faceted URL" means that filtered URL tells Google it itself is the authoritative version, rather than pointing back to the clean parent page (e.g., `/womens-pants`). Google then sees each filter combination as its own separate page, even though they all show essentially the same product listing with a subset of items. With dozens of filters and hundreds of products, this can silently create tens of thousands of near-duplicate pages on your site.
Search engines have a limited "crawl budget" — a cap on how many pages they'll crawl and index from your site in a given period. When filter URLs are all treated as unique, indexable pages, Googlebot wastes that budget crawling thousands of low-value duplicates instead of your important product and category pages, which can delay or prevent those pages from appearing in search results. Duplicate content across filter URLs also dilutes the ranking signals (links, authority) that should be concentrated on your clean category pages, weakening their ability to rank. Fixing this can directly improve how quickly Google discovers and ranks your real pages, protecting and growing your organic traffic and revenue.
See the complete Faceted url indexable guide for every platform and the full background.
Not sure if your Next.js (Headless) store has this?
Run a free SEOLZ scan — we’ll find faceted url indexable and every other issue across your whole site.
Scan my site free