How to have collections that are not indexed and visble on the website.com/collections/ URL?

I have created some collections of products that I only want to use in metafields but don’t want to be public (i.e. indexed by search engine, visible in the URL “website.com/collections/” or searchable on my website).

For instance, for a given blog post, I have created a metafield “Collection”. In my blog post template, I dynamically display this metafield “Collection”.

So when users are on this blog post, they can see a collection of products relevant.

However, I don’t want this collection to be indexed by search engines and to be visible on the “website.com/collections/” URL.

How am I supposed to proceed?

Try adding “noindex” tag on the theme for the specific collection.


This tag will prevent the pages from being indexed on searchengine.

If you want to add noindex tag to a specific collection, you should add below codes.

{% if collection.handle == "##COLLECTION HANDLE HERE##" %}

{% endif %}

Note:

  1. Replace ##COLLECTION HANDLE HERE## with your real collection handle.

  2. Add the above code on theme.liquid file.

  3. Add the above code inside the head tag .

If you want further help to get this done, dont hesitate to reach out.