How can I remove '/collections' from the URL in the Dawn theme?

Topic summary

A user seeks to remove ‘/collections’ from product URLs in Shopify’s Dawn theme for SEO purposes. Traditional tutorials for older themes don’t apply to Dawn’s structure.

Initial Solution Provided:
One response outlines a method for older themes (like Turbo) involving:

  • Searching theme files for within: collection code
  • Removing | within: collection from product URL filters
  • Creating redirects to prevent broken links
  • Testing changes after implementation

Dawn Theme Challenge:
The original poster searched Dawn’s snippet files (product-media.liquid, product-thumbnail.liquid, pagination) but found no within: collection code. They shared their main-product-grid.liquid file, confirming Dawn uses a different URL structure than older themes.

Current Status:
The discussion remains unresolved with multiple users asking if anyone found a solution. One late response links to a YouTube tutorial, but no confirmed working method for Dawn theme has been shared in the thread. The core issue is that Dawn’s architecture differs significantly from themes where the standard fix applies.

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

Step 1: Back up your theme!

First, you’ll want to take a backup copy of your theme. Just in case.

Step 2: Find the code to remove

For this example, I’m using an old version of Turbo (6.2) by Out of the Sandbox.

In the Shopify admin, go to Online Store → Themes → select the … → Edit Code. Search your theme files for within: collection.

This part can be a bit tricky to locate because Shopify doesn’t have a theme-wide search. So you have to go file by file. For this version of Turbo, the code I need to edit is in the snippets/product-details.liquid file and the snippets/product-thumbnail.liquid file.

Since each theme is different you may need to find the file for the product-grid or product-loop. If you still aren’t sure where this code is, you can search through each snippet file. There are Chrome extensions to search through your Shopify theme files, but I avoid using Chrome which is a story for another day.

Once you’ve found the within: collection we want to remove only that part.

We’ll end up with something like this:

Before:

{{ product.url | within: collection }}

After:

{{ product.url }}

You may need to search a few times for that line of code to make sure the | within: collection is removed for multiple spots. Many themes have the same piece of code duplicated.

Save the files you’ve edited and check on your results.

Step 3: Test the pages

Anytime you edit the theme files, you’ll want to check right away to make sure you didn’t break anything.

Shopify caches pages LIKE CRAZY so it may take a few minutes for your changes to reflect on the live site.

To test your changes, select a collection and navigate to a random product. In your URL bar, it should not have the collection or collection name.

Step 4: Create redirects

Assuming your site is live and you’ve already had your collection base product URLs indexed, don’t forget to create URL redirects. Forgetting to do this important piece will cause potential customers to land on an error page.