Duplicate Content - Same Page with different url

Pingxiang_Wang
Tourist
5 0 1

https://giftforyou.store/collections/home-collection/products/wedding-guest-dress-for-women-spring-2...

https://giftforyou.store/products/wedding-guest-dress-for-women-spring-2018-valentines-gifts-for-wif...

This two links are exact the same content with different urls. One is home collection and one is clicked in other pages. 

How could I fix this or to get the home collection product link to redirect to the product link?

Replies 33 (33)
6batigoal
New Member
2 0 0

After opening literally every .liquid, found it in the product-thumbnail, i'm so stupid haha

eplewes
New Member
2 0 0

Hi where would I find this for the Responsive theme?

edgarmichel
New Member
1 0 2

For shella theme: Go to snippet -> product-res-variables.liquid -> Line 22 -> Change {%- assign url = product.url | within: collection -%} in to {%- assign url = product.url -%}

lkstar
Excursionist
13 1 1

Hi - I can't find this code in the corresponding snippet in the minimal theme... can you point me in the right direction? many thanks! lk

User17
New Member
1 0 0

I am also looking for this code in the minimal theme..

Gago
New Member
7 0 0

Hello everybody,

I have modified the code in snippets for my theme "Debut", however  the links for both [product] and [product in collection] still work separately. Could anybody give further instruction?

Appreciate!

SarahMMoore1
Excursionist
13 0 4

Has anyone figured out how to do this with the minimal theme?

 

PWJ
Tourist
9 2 5

For Minimal theme go to Snippets > product-grid-item.liquid

On about line 25 you should see a line that starts with <a href="{{ featured.url | within: collection }}" change this part to <a href="{{ featured.url }}"

Basically deleting | within: collection from the link. This should give all your product pages URLs of the form "site/products/product-link". It does alter the breadcrumb links so that rather than having Home > Collection Link > Product Link if you've navigated via a collection it changes the breadcrumb to Home > Product Link instead.

MS_SBP
New Member
1 0 0

I'm using the Minimal theme, but I have no product-grid-item.liquid under Snippets. Can you advise? Thanks. --MS

happylife
Tourist
7 0 2

I have the same problem. After I adopted your code, my collections URL became what I wanted,

https://www.kuoser.com/collections/dog-jackets-coats

But my breadcrumb lack collections. Any ideas on the complete breadcrumb?  What code should i add?

https://www.kuoser.com/products/plaid-reversible-dog-winter-jacket

20211027.png

 

IntellitonicSEO
New Member
1 0 0

Hi folks, 
Late to the party but we did some digging last year and found a solution to the duplicate product URLs. The theme.liquid file varies, but this should be able to point people in the right direction. https://intellitonic.com/blog/an-seo-tutorial-for-handling-shopifys-duplicate-collections-and-produc... 

sandy786
Tourist
9 0 1

I have the same issue. I need my product page needs to be indexed instead of the collection page.

how can I do it??

 

Bbouttemy
New Member
4 0 0

Hi I've the same issue.
Did you find a solution to put back your collections links in your product page ?

BrianDR
Tourist
10 0 0

Great article.  I am using the Flex theme from Out Of The Sandbox. 

 

After going through all of the liquid files in FLEX, I found:

 

 <a href="{{ product.url | within: collection }}">

 

in a few  locations:

 

product-slider.liquid 

product-thumbnail.liquid

product-thumbnail__product-info.liquid 

product-thumbnail__quick-shop-button.liquid 

include-featured-product.liquid

product-thumbnail__swatch.liquid - *this file is actually handling {{ variant.url | within: collection }} 

I've altered all but the last...removing the 'within:collection'.

Unfortunately, there is no change.  

Any ideas as to what I am missing?