How to fix seo facet url not canonicalized on Headless / Custom (I build in code)
Add a canonical tag to every filtered, sorted, and paginated collection/category URL pointing back to the clean (unfiltered) category URL, so Google consolidates duplicate pages and focuses crawl budget on your real content.
Steps for Headless / Custom (I build in code)
- In your page rendering logic (Next.js, Nuxt.js, Astro, etc.), detect when query parameters representing filters, sorts, or pagination are present on a category/collection route.
- Construct the canonical URL by stripping all recognised filter/sort/pagination parameters from the current URL, leaving only the clean path.
- Inject the canonical into the <head> using your framework's head-management solution (e.g. Next.js: use <Head><link rel='canonical' href={cleanCategoryUrl} /></Head> via next/head or the App Router metadata API; Nuxt: use useHead({ link: [{ rel: 'canonical', href: cleanCategoryUrl }] })).
- Ensure this logic runs server-side (SSR or SSG) so the canonical is present in the initial HTML response, not injected after JavaScript runs.
- Add an automated test that checks the canonical tag value on a URL with query parameters matches the expected clean URL.
- Deploy and verify with Google Search Console URL Inspection.
What is seo facet url not canonicalized?
When shoppers filter your product listings by size, colour, price, or sort order — or browse to page 2, 3, etc. — your store generates a new URL for each combination (e.g. `/collections/hoops?color=red&sort=price` or `/collections/hoops?page=5`). These "facet URLs" display largely the same products as the base category page, making them near-duplicate pages. A canonical tag is a small piece of HTML that tells Google: "Treat THIS page as the authoritative, indexable version — not the one you just crawled." Pointing every facet URL's canonical back to the clean category URL (e.g. `/collections/hoops`) is the standard, Google-recommended way to handle this.
Without canonical tags, Google may index hundreds or thousands of near-identical filter and pagination URLs instead of your core category pages — diluting the ranking signals (links, authority, clicks) that should be concentrated on those pages. Crawl budget is wasted on low-value filter combinations, meaning new or updated products get discovered more slowly. Duplicate content confusion can push the wrong URL into search results, giving shoppers a paginated or pre-filtered page that looks broken. Fixing canonicals consolidates ranking signals onto your clean category pages, improves crawl efficiency, and protects your organic traffic from unnecessary duplication penalties.
See the complete Seo facet url not canonicalized guide for every platform and the full background.
Not sure if your Headless / Custom (I build in code) store has this?
Run a free SEOLZ scan — we’ll find seo facet url not canonicalized and every other issue across your whole site.
Scan my site free