Remove the tag parameter in collection urls

Topic summary

Issue: Shopify is indexing collection pages filtered by tags (e.g., /collections/collection-name/tag1 or with ?constraint=tag1), creating duplicate content. Shopify’s default canonical for tagged collections points to the tagged URL, not the clean collection.

Options discussed:

  • Editing canonical to strip parameters (removing “?constraint=”) was considered but doesn’t fix path-based tag URLs.
  • Using Google’s URL Parameters tool was mentioned but not adopted in the thread.
  • Adding a meta robots noindex for tagged collection pages was proposed and implemented.

Technical approaches shared:

  • Build a clean canonical: split canonical_url at “?” to drop parameters; on collection pages with current_tags, set canonical to collection.url (prepend domain) and use this new_canonical_url instead of the default.
  • Simpler fix: add a conditional noindex (if template contains ‘collection’ and current_tags) in the head so all /collections with tags are deindexed.

Outcome/Status:

  • The noindex snippet was added to the theme head (head-tag.liquid or theme.liquid), verified in page source, and confirmed working (tagged pages deindexed). One earlier suggestion to convert tag paths into ?constraint parameters was dismissed by the OP. The discussion appears resolved with a practical noindex implementation.
Summarized with AI on January 16. AI used: gpt-5.

That’s great thanks so much! :slightly_smiling_face: