Collections Internal Links Point To Collection URLs not Canonical Products

New Member
3 0 0


I'm seeing the following;

  • When navigating to a Product from a Collections page the Product page is displayed as .com/collections/collection-name/products/product-name
  • Looking at the Canonical link on that page it points to the true product page - .com/products/product-name

My question is, as our products only belong to one collection, is there a way to make the Product shown in the collection page link directly through the Collection page?

i.e. It looks the same however the products displayed link to - .com/products/product-name rather than .com/collections/collection-name/products/product-name


The reason I ask is that from an SEO point of view the internal linking from the collections pages point to the /collections/ URL which is then canonically redirected to /products/ which adds time to crawling the site as well as loses link equity through the redirect.


Thanks in advance.

Shopify Partner
72 0 6

Hey Chris,

Take a look at this page:

It explains exactly what you're experiencing in your store.

And to directly answer your question: 

On the link to your product (in the collection page) you probably have something like this:

{{ product.url | within: collection }}

Just change it to:

{{ product.url }}

And that should do the trick.

Good luck with it!


New Member
3 0 0

Hi Raul, 

Thanks for the reply. In the collection.liquid file I don't seem to have that option....

{% paginate collection.products by settings.products_per_page %}
		<!-- PRIMARY -->
		<div id="primary_column">
			<!-- START CONTENT -->
			{% capture col_url%}{% if collection.url.size == 0 %}/collections/all{%else%}{{collection.url}}{%endif%}{%endcapture%}

			<div class="hgroup">
				<h1>{{ collection.title | escape }}</h1>
			{% if collection.description.size > 0 %}<div id="collection_description" class="body">{{ collection.description }}</div>{% endif %}
			{% if collection.products.size > 0 %}
            {% include "pagination" %}
			<!-- START PRODUCTS -->
			<div id="products" class="large_products{%if settings.product_display_type == 'masonry' %} masonry{%endif%}{%if settings.product_display_type == 'fluid' %} fluid{%endif%}">
				{% assign first_clear = '<div class="clearfix"><!--startin-->' %}
				{% for product in collection.products %}
					{% if settings.product_display_type != 'masonry' %}
						{% cycle first_clear, '', '' %}
						{% if forloop.index > 1 %}{%capture first_clear%}</div><div class="ie7break"></div><div class="clearfix">{%endcapture%}{%endif%}
					{% endif %}
					{% include 'large_product' with 3 %}
				{% endfor %}
				{% if settings.product_display_type != 'masonry' %}</div>{%endif%}
			<!-- END PRODUCTS -->
			{% include "pagination" %}
			{% else %}
			<p id="empty">There are no products in this collection.</p>{% endif %}

			<!-- END CONTENT -->
		<!-- / PRIMARY -->
		{% endpaginate %}

I feel like I'm missing something.....

Hopefully you can help!

Shopify Partner
72 0 6


In your theme, it should be in the file called large_product.liquid, which is included from the template you've just pasted.

New Member
3 0 0

Amazing! RESOLVED!


Thanks a lot Raul

Shopify Partner
72 0 6

Cool! Glad I could help.

10 0 0

Hi Raul,

I am trying to achieve exactly the same thing as Chris.

I have checked in the collection.liquid, list-collections-template.liquid, product.liquid, etc files and cannot seem to find any reference to 

within: collection


Could you please help to point me in the right direction?

This is an example collections url from our site: