Liquid, JavaScript, themes, sales channels
Problem no1
We have product pages with URLs created as follows:
https://kafferaven.se/products/abakundakawa
https://kafferaven.se/products/espresso-a-adventure
However, "Collection" pages additionally create unique URLs based on each collection name, ie.
https://kafferaven.se/collections/single-estate-coffee/products/abakundakawa
https://kafferaven.se/collections/espresso/products/espresso-a-adventure
Is there a way to prevent Collection pages from creating new URLs based on each category? Ideally, we want to keep basic product slug everywhere /products/xxxxxxxx
Problem no2
How can we noindex/nofollow choosen "Collection" pages, which are just placeholders for products?
Problem no3
How to remove URL from the menu, so we can still hoover and open the dropdown list, however without having a link to main category page?
Problem no1
This is not an SEO issue because your theme's source code include a canonical URL tag that let's search engines know the /collections/products/x URL version is the same as the /products/x version.
Problem no2
You can add a special metafield to each of these collections that will 1) remove it from Shopify's sitemap.xml 2) add a 'noindex' meta tag. More info here: https://shopify.dev/tutorials/manage-seo-data-with-admin-api#hide-a-resource-from-search-engines-and... You'll need a metafield editor app. There are some free ones in the app store.
Problem no3
Replace the link to the collection with '#'. So, clear out the current link, type in '#', click it in the small popup that appears.
It is considered one of the most common SEO issues. Here are few measures to be followed to avoid the problem:
Taking an example of selling shirts and sort them by their sleeve length using tags, you will get four indexable pages that will be showing the same content and information that are on the main collection page. So, There a few solutions to this issue:
{% if template contains 'collection' and current_tags %}
<meta name="robots" content="noindex" />
<link rel="canonical" href="{{ shop.url }}{{ collection.url }}" />
{% else %}
<link rel="canonical" href="{{ canonical_url }}" />
{% endif %}
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024