Using Dawn 13.0, no custom theme, all default store build.
I have built a structure of simple shopify pages. Around 75 or so. I need to point them all to the parent page, which is the only relevant page to be indexed (duplicate data on the others(SEO)).
Using canonical tags is indeed the best practice in this scenario. Canonical tags inform search engines that a particular page is the preferred version among a set of duplicate pages, ensuring that your SEO efforts are concentrated on the parent page.
This seems to be a custom request. We can make the use of metafield to store canonical tags for each page. For this we will have to make changes on the theme. Do you have any experiance creating a meta field? If yes, I can provide a step by step instrutions on how to get this done.
Hi @surfingcinv
You can add this code before closing head tag
{% if page.handle contains "shade-selector" %}
{% endif %}
It will set same canonicals to all pages that has shade-selector in handle
For more advance conditions, You can use metafields
Please check if it is helpful to you
Thanks!
Nope. These pages have different content, so canonical is not applicable here. Canonical is used for pages with identical content.
For example – when product belongs to 5 collections there are 5 collection-aware URLs pointing to this product page and one collection-less link. But the product page is the same – this is where you’d use canonical.
would not be included in your sitemap (modifying robots.txt would not do it and Google will complain about “page in index, but disallowed by robots”
would set in the head of this page (kinda equivalent to disallow in robots.txt)
Thanks. This looks like the right solution in this case. I pasted detailed instructions for anyone else trying to do this for shopify (PAGES)
Once logged into your Shopify admin
Select Settings.
Scroll down to Metafields on the side bar.
Select Pages and click on Add definition.
Enter a title for the metafield, I used “Hide from search engines” so it’s recognizable.
Replace the content in Namespace and key with seo.hidden – this must be exactly as you see it here.
Select the plus icon to Select content type and choose Number.
Make sure Integer is selected.
Select Save.
Shopify Admin dashboard, go to your pages and select the page you wish to hide from search engines.
Once on your product page, scroll to the very bottom.
You’ll now see the metafield you’ve added.
Select the text area in the gray box.
Enter 1.
Select Save.
The end result is that particular page will be removed from search engines. You can verify this by right clicking on the page and selecting View Source. Look for robots and you should see in the code that it now says: