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

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 :slightly_smiling_face:

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

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 “” 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:

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):

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

Daniel

1 Like

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?

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

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

1 Like

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.

1 Like

important: it also hide from SEO

After more searching and experimentation, I’ve found a solution to hide items from INTERNAL SEARCH only, but not SEO engines.
It’s a bit of a hack, but I’ve tested and it works for me.

Implement the solution exactly as above, but make the seo.hidden field a ‘Single line text’ instead of an ‘Integer’ type.
That way, it’s hidden from your internal search, but the theme code that checks this field must ignore it before of the switch to the type…

I do think there should be a better way that we don’t have to hack our way around, but right now this works, so I wanted to update the thread!