Same here - is there a way to locate the filter and set rules? So far I can use metafield with noindex set to false or true, but I don’t want to filter pages to be indexed.
Topic summary
Users are struggling to prevent Google from indexing Shopify collection pages that include filter parameters (e.g., URLs with size and category tags like /collections/all/size__xxl%20category__outerwear). These filtered pages appear in search results with unwanted meta titles.
Attempted Solutions (unsuccessful):
- Adding
noindexmeta tags in theme.liquid using conditions like{% if template contains "collection" and collection.handle == "?filter" %} - Blocking filtered URLs in robots.txt with patterns like
Disallow: /collections/*?*filter* - Using metafield-based noindex rules
Core Technical Issue:
The main challenge is that filter parameters appear after a question mark (?) in the URL, which isn’t part of Shopify’s URL handle. This makes it impossible to target these pages using standard Liquid template conditions that check collection.handle or similar variables.
One user shared a more complex code snippet that handles various URL patterns and uses metafields, but the fundamental problem of targeting the ? character in filtered URLs remains unresolved. The discussion is ongoing with no confirmed working solution.