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.

Ive searched all my snippets folder for within:

Unfortunately i think Dawn theme may use a different line of code. Nothing at all.

Heres product-media.liquid and product-thumbnail liquid. Ive also put pagination in here as this to me would make the most sense, hoping someone can see the code in here.

Product Media

{% comment %}
Renders product media

Accepts:

  • media: {Object} Product Media object
  • loop: {Boolean} Enable video looping (optional)
  • variant_image: {Boolean} The media associated with a variant

Usage:
{% render ‘product-media’,
media: media,
loop: section.settings.enable_video_looping,
variant_image: true
%}
{% endcomment %}

{%- if media.media_type == ‘image’ -%}
<img
class=“global-media-settings global-media-settings–no-shadow”
srcset=“{%- if media.preview_image.width >= 550 -%}{{ media.preview_image | image_url: width: 550 }} 550w,{%- endif -%}
{%- if media.preview_image.width >= 1100 -%}{{ media.preview_image | image_url: width: 1100 }} 1100w,{%- endif -%}
{%- if media.preview_image.width >= 1445 -%}{{ media.preview_image | image_url: width: 1445 }} 1445w,{%- endif -%}
{%- if media.preview_image.width >= 1680 -%}{{ media.preview_image | image_url: width: 1680 }} 1680w,{%- endif -%}
{%- if media.preview_image.width >= 2048 -%}{{ media.preview_image | image_url: width: 2048 }} 2048w,{%- endif -%}
{%- if media.preview_image.width >= 2200 -%}{{ media.preview_image | image_url: width: 2200 }} 2200w,{%- endif -%}
{%- if media.preview_image.width >= 2890 -%}{{ media.preview_image | image_url: width: 2890 }} 2890w,{%- endif -%}
{%- if media.preview_image.width >= 4096 -%}{{ media.preview_image | image_url: width: 4096 }} 4096w,{%- endif -%}
{{ media.preview_image | image_url }} {{ media.preview_image.width }}w”
sizes=“(min-width: 750px) calc(100vw - 22rem), 1100px”
src=“{{ media.preview_image | image_url: width: 1445 }}”
alt=“{{ media.alt | escape }}”
loading=“lazy”
width=“1100”
height=“{{ 1100 | divided_by: media.preview_image.aspect_ratio | ceil }}”
data-media-id=“{{ media.id }}”
{% if variant_image %}class=“product__media-item–variant”{% endif %}

{%- else -%}
{%- if media.media_type == ‘model’ -%}

{%- else -%} {%- endif -%} {%- if media.media_type == 'model' -%} {%- render 'icon-3d-model' -%} {%- else -%} {%- render 'icon-play' -%} {%- endif -%} {{ media.preview_image.alt | escape }} {%- case media.media_type -%} {%- when 'external_video' -%} {%- assign video_class = 'js-' | append: media.host -%} {%- if media.host == 'youtube' -%} {{ media | external_video_url: autoplay: true, loop: loop, playlist: media.external_id | external_video_tag: class: video_class, loading: "lazy" }} {%- else -%} {{ media | external_video_url: autoplay: true, loop: loop | external_video_tag: class: video_class, loading: "lazy" }} {%- endif -%} {%- when 'video' -%} {{ media | media_tag: image_size: "2048x", autoplay: true, loop: loop, controls: true, preload: "none" }} {%- when 'model' -%} {{ media | media_tag: image_size: "2048x", toggleable: true }} {%- endcase -%}

{%- if media.media_type == ‘model’ -%}

<button
class=“button button–full-width product__xr-button”
type=“button”
aria-label=“{{ ‘products.product.xr_button_label’ | t }}”
data-shopify-xr
data-shopify-model3d-id=“{{ media.id }}”
data-shopify-title=“title”
data-shopify-xr-hidden

{% render ‘icon-3d-model’ %}
{{ ‘products.product.xr_button’ | t }}

{%- else -%} {%- endif -%} {%- endif -%}

Product thumbnail

{% comment %}theme-check-disable ImgLazyLoading{% endcomment %}
{% comment %}
Renders a product thumbnail with a modal-opener

Accepts:

  • media: {Object} Product Media object
  • position: {String} Position of the media. Used for accessible label.
  • loop: {Boolean} Enable video looping (optional)
  • modal_id: {String} The product modal that will be shown by clicking the thumbnail
  • xr_button: {Boolean} Renders the “View in your space” button (shopify-xr-button) if the media is a 3D Model
  • media_width: {Float} The width percentage that the media column occupies on desktop.
  • lazy_load: {Boolean} Image should be lazy loaded. Default: true (optional)

Usage:
{% render ‘product-thumbnail’,
media: media,
position: forloop.index,
loop: section.settings.enable_video_looping,
modal_id: section.id
%}
{% endcomment %}

{%- if media.media_type == 'video' or media.media_type == 'external_video' -%} {% render 'icon-play' %}
{{ media.preview_image.alt | escape }}
{{ 'products.product.video_exit_message' | t: title: product.title | escape }} {%- else -%}
{{ media.preview_image.alt | escape }}
{%- endif -%} {%- liquid case media.media_type when 'video' or 'external_video' render 'icon-play' when 'model' render 'icon-3d-model' else render 'icon-zoom' endcase -%}
{{ media.preview_image.alt | escape }}
{{ 'products.product.media.open_media' | t: index: position }}

{%- if media.media_type != ‘image’ -%}
{%- if media.media_type == ‘model’ -%}

{%- else -%}

{%- endif -%}


{%- if media.media_type == ‘model’ -%}
{{ ‘products.product.media.play_model’ | t }}
{%- render ‘icon-3d-model’ -%}
{%- else -%}
{{ ‘products.product.media.play_video’ | t }}
{%- render ‘icon-play’ -%}
{%- endif -%}

<img
srcset=“{% if media.preview_image.width >= 493 %}{{ media.preview_image | image_url: width: 493 }} 493w,{% endif %}
{% if media.preview_image.width >= 600 %}{{ media.preview_image | image_url: width: 600 }} 600w,{% endif %}
{% if media.preview_image.width >= 713 %}{{ media.preview_image | image_url: width: 713 }} 713w,{% endif %}
{% if media.preview_image.width >= 823 %}{{ media.preview_image | image_url: width: 823 }} 823w,{% endif %}
{% if media.preview_image.width >= 990 %}{{ media.preview_image | image_url: width: 990 }} 990w,{% endif %}
{% if media.preview_image.width >= 1100 %}{{ media.preview_image | image_url: width: 1100 }} 1100w,{% endif %}
{% if media.preview_image.width >= 1206 %}{{ media.preview_image | image_url: width: 1206 }} 1206w,{% endif %}
{% if media.preview_image.width >= 1346 %}{{ media.preview_image | image_url: width: 1346 }} 1346w,{% endif %}
{% if media.preview_image.width >= 1426 %}{{ media.preview_image | image_url: width: 1426 }} 1426w,{% endif %}
{% if media.preview_image.width >= 1646 %}{{ media.preview_image | image_url: width: 1646 }} 1646w,{% endif %}
{% if media.preview_image.width >= 1946 %}{{ media.preview_image | image_url: width: 1946 }} 1946w,{% endif %}
{{ media.preview_image | image_url }} {{ media.preview_image.width }}w”
src=“{{ media | image_url: width: 1946 }}”
sizes=“(min-width: {{ settings.page_width }}px) {{ settings.page_width | minus: 100 | times: media_width | round }}px, (min-width: 990px) calc({{ media_width | times: 100 }}vw - 10rem), (min-width: 750px) calc((100vw - 11.5rem) / 2), calc(100vw - 4rem)”
{% unless lazy_load == false %}loading=“lazy”{% endunless %}
width=“973”
height=“{{ 973 | divided_by: media.preview_image.aspect_ratio | ceil }}”
alt=“{{ media.preview_image.alt | escape }}”

{%- liquid case media.media_type when 'external_video' assign video_class = 'js-' | append: media.host if media.host == 'youtube' echo media | external_video_url: autoplay: true, loop: loop, playlist: media.external_id | external_video_tag: class: video_class, loading: "lazy" else echo media | external_video_url: autoplay: true, loop: loop | external_video_tag: class: video_class, loading: "lazy" endif when 'video' echo media | media_tag: image_size: "2048x", autoplay: true, loop: loop, controls: true, preload: "none" when 'model' echo media | media_tag: image_size: "2048x", toggleable: true endcase -%}

{%- if media.media_type == ‘model’ -%}

{%- if xr_button -%}
<button
class=“button button–full-width product__xr-button”
type=“button”
aria-label=“{{ ‘products.product.xr_button_label’ | t }}”
data-shopify-xr
data-shopify-model3d-id=“{{ media.id }}”
data-shopify-title=“title”
data-shopify-xr-hidden

{% render ‘icon-3d-model’ %}
{{ ‘products.product.xr_button’ | t }}

{%- endif -%}
{%- else -%}

{%- endif -%}
{%- endif -%}

Pagination

{% comment %}
Renders a set of links for paginated results. Must be used within paginate tags.

Usage:
{% paginate results by 2 %}
{% render ‘pagination’, paginate: paginate, anchor: ‘#yourID’ %}
{% endpaginate %}

Accepts:

  • paginate: {Object}
  • anchor: {String} (optional) This can be added so that on page reload it takes you to wherever you’ve placed your anchor tag.
    {% endcomment %}
{{ 'component-pagination.css' | asset_url | stylesheet_tag }}

{%- if paginate.parts.size > 0 -%}

{%- endif -%}