How to remove collection from the products URL - Turbo Theme

Topic summary

Issue: Shopify automatically includes collection names in product URLs, creating multiple URLs for products in different collections (e.g., domain/collection/collection-name/product-name). The desired structure is domain/products/product-name.

Known Solution: Remove within: collection from specific theme files to fix the URL structure.

Problem: The user cannot locate this code in their Turbo Sandbox theme’s Out of Stock files (product-card-grid.liquid, product-grid-item.liquid, collection.liquid).

Resolution: A helper identified the code location in the product-thumbnail.liquid file. Removing within: collection from this file resolves the issue, ensuring product URLs remain consistent regardless of which collection is used for navigation.

Note: The discussion involved sharing collaborator access to directly examine the theme files.

Summarized with AI on November 6. AI used: claude-sonnet-4-5-20250929.

This is a known issue, and there are several chats on this topic.

Shopify (irrespective of the theme) automatically includes the collection name in the product URL. For example, if a product is part of 3 collections, Shopify creates 3 distinct URLs for the same product. Example:

domain/collection/collection name 1/product name 1

domain/collection/collection name 2/product name 1

domain/collection/collection name 3/product name 1

This structure is correct: domain/products/product name 1. The URL remains unchanged no matter from which collection you navigate to the product page.

All chats agree on the solution: remove “within collection,”, and the issue is resolved.

My problem is that I cannot locate this part. My theme is Out of the Sandbox Turbo and there is no:

product-card-grid.liquid. ; product-grid-item.liquid**;** collection.liquid.

I would really appreciate it if someone could point out the location of “within: collection” in Out of the Sandbox Turbo.

Thanks in advance.

1 Like

Hi @Storeowner4 ,

Can I send you a collaborator invitation? It will help me check this best

I sent you a code via email. It is required for collaborator requests.

1 Like

Hi @Storeowner4 ,

I have sent the request, after access, I will check and notify soon

Hi @Storeowner4 ,

You can find it at product-thumbnail.liquid file, after removing it everything will work fine.