Re: Hide a product from SEO and from the Shopify frontend search with metafield

Hide a product from SEO and from the Shopify frontend search with metafield

Lukas50
Shopify Partner
7 0 1

Hello everyone,

 

I'm trying to search an easy ways to hide a specific product from:

- SEO

- Shopify predictive search

- Shopify search page

 

In the docs many people mentioned that you can use a metafield called "seo.hidden" and just change the value for the product to 1. For some reason this metafield is already declared but not editable. The only way I can access the metafield is by the bulk editor link "

https://SHOP.myshopify.com/admin/bulk?edit=metafields.seo.hidden%3Anumber&resource_name=Product

". When I change a value there Shopify is telling me to enter a valid value. 1 doesn't seem to be valid like discussed in other forums. 

 

Does anyone knows a solution to this one?

 

Best regards

Lukas 🙂 

Replies 6 (6)

Ablestar_Daniel
Shopify Partner
121 22 37

Hi  Lukas,

 

I took a look at this on a test store and it seems like adding a metafield definition for the "seo.hidden" metafield gets it to work:

 

  • Open up the Shopify Admin
  • Go to Settings -> Metafields -> Add Definition
  • Create a definition that looks like this and save it

Screenshot 2023-01-11 at 9.42.57 AM.png

 

Then when I go to https://examplestore.myshopify.com/admin/bulk?resource_name=Product&edit=metafields.seo.hidden&selectedView=all I can set the value to 1 and save it without error.

 

You can verify that the item is hidden by looking at the source of a product detail page where you should now see the code "<meta name="robots" content="noindex,nofollow">" in it.

 

Another advantage to using a metafield definition is that you can also toggle the SEO visibility for a product directly from the product detail page:

 

DanielAblestar_0-1673427131719.png

 

If you need to update a bunch of products at once I would also recommend our app, the Ablestar Bulk Product Editor. Using the free plan you can do bulk updates on metafields that match almost any set of conditions (eg, set seo.hidden to one for all products created more than 10 days ago that don't have an image):

 

DanielAblestar_1-1673427199926.png

 

Hope this helps and let me know if you have any other questions. Best,


Daniel

 

Founder @ Ablestar ✦
Manage product data, spreadsheets, Google Shopping data, and metafields with Ablestar Bulk Product Editor. Use previews, undos, and automations to be confident your product data is correct.
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
abrar_anwar
Shopify Partner
16 1 0

Hey @Ablestar_Daniel 
It is possible to hide just only on the storefront but not on Search engines. 
Or hide on search engines but not on storefront using this approach?

Ablestar_Daniel
Shopify Partner
121 22 37

Hi @abrar_anwar, the above method will hide the product from search engines but not the storefront.

 

As far as I know, the product will have to be visible on the web for the search engines to index it so I don't think there's a way to only make it visible on search engines.

 

Best,

Daniel

Founder @ Ablestar ✦
Manage product data, spreadsheets, Google Shopping data, and metafields with Ablestar Bulk Product Editor. Use previews, undos, and automations to be confident your product data is correct.
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
SunnyBear
Visitor
1 0 1

Hi Daniel,

Is there a way to hide add-on products on the storefront? I have add-on products to my core product that I don't want to show up when someone searches all products on my storefront.

 

Best,

Paul

dori_
Excursionist
13 0 6

Hi! I saw someone else find a workaround for hiding products on the store front. You have to create a collection with the url "all" because collections/all is where "all products" are located by default. You can rename the collection title to something else though, like "All Products". Put all of your products into this collection that you want visible. Then, just make sure your hidden products are not in any collection.

This worked for me, and my "hidden" products do not come up when searching in my store or clicking view all.

DariusWS
Shopify Partner
84 1 20

important: it also hide from SEO