How to hide products from Shopify search

Posted on Categories Shopify
How to hide products from Shopify search

Updated 23rd May 23 – Updated to reflect recent changes to Shopify’s interface and the discontinuation of the ShopifyFD extension.


If you want to hide a product and prevent people from finding it on your Shopify store – including if they search for it – there are a few steps you need to take.

Of course, you can just set the product as a Draft, which only allows your Staff to view it, but maybe you want to hide a product from your storefront but still allow users to access it via a direct link.

This could be because you’ve got a special offer product, one which you only want to promote to specific customers via an email mailshot or AdWords campaign, or perhaps something isn’t quite ready and you want to share with a member of your team via a secret link, without giving them access to your store’s back end.

It seems easy enough to hide products on Shopify – you just don’t add them to a collection, and ensure sure that you have set up a manual ‘All’ collection which excludes the product.

However, they will continue to show up in your site’s search area and on Google. If your product has a similar name to another one of your products, someone may accidentally stumble across it when searching for the similarly-named product.

Thankfully, it’s pretty easy to hide a product from your shop’s search and prevent it from being indexed by Google. It involves adding some custom metadata.

This is the data you want to add:

"namespace" : "seo"
"key" : "hidden"
"value" : 1
"value_type" : "integer"

If you aren’t familiar with Shopify metadata, that may appear a whole load of useless information. So what does it actually mean, and how do you use it?

Metadata is additional data that you can add to your products – it’s typically used for custom fields which can appear in your themes, in addition to the standard product title and description.

Unfortunately, Shopify doesn’t make it easy to edit metadata “out of the box,” and the leading browser extension to allow you to edit the metadata no longer exists.

Instructions for hiding products from Shopify search

The first time you want to remove a product from Shopify search, you will need to set up a custom field definition.

This only needs to be done once, and going forward you will be able to remove it right from the Product edit screen.

From your shop’s admin screen, click Settings at the bottom left of the main menu.

Click Custom Data > Products

Click Add Definition.

Name the definition ‘Hide from Search’ (or a similar name of your choice).

Under Namespace and key, enter:

seo.hidden

Click Select type and choose ‘Integer’ and ‘One value’.

Your screen should look like the below:


If you have previously followed the old version of these instructions, you will get an error telling you ‘Namespace and key are already taken‘.

Shopify will invite you to ‘View metafields without a definition,’ but the seo.hidden metafield mysteriously doesn’t show up.

To fix this, go to the following URL, replacing SHOPNAME with the correct one for your shop:

https://SHOPNAME.myshopify.com/admin/settings/custom_data/product/metafields/migrate/seo/hidden

(Thanks to CaptainActive on the Shopify forum for this tip)

If you don’t know what to replace SHOPNAME with, then log into your shop admin section and take a look at the URL in your address bar. You should see that it begins with https://SHOPNAME.myshopify.com/ – you’ll just need to take the value of SHOPNAME and change it in the URL above.


Once you’ve added the meta field, a new panel will show up at the very bottom of the product edit screen:

Click the 0 value and change it to a 1, then save your product.

All done, your product will no longer show up when someone searches for it in your shop’s search bar.

As long as you hide it from all of your Collections, it’ll now be a hidden product that you can link to manually without any of your normal customers being able to come across it.

As an added benefit, this metadata will also add a ‘noindex’ tag to your page, preventing Google from adding it to its search index. Note, if your product has already been indexed on Google, it will take between a few days and a few weeks to be removed from its index, depending on how often Google crawls your website.

If you later want the product to re-appear in your site search and on Google, you will need to change the value to 0.


How to hide products in bulk from Shopify search

If you have more than a handful of products, having to go into each one and set its metadata manually will quickly become tedious.

Thankfully, Shopify has a ‘Bulk Editor’, which allows you to quickly edit product data for all of your products on one screen.

Just navigate to the following URL, being sure to replace SHOPNAME with the relevant name used to access your shop’s admin section.

https://SHOPNAME.myshopify.com/admin/bulk?resource_name=Product&show=image%2Ctitle%2Cvariants&edit=metafields.seo.hidden%3Anumber

Load the Bulk Editor from the link, then change the value of ‘Hidden’ to 0 for each product you want to hide from your Shopify site search. Be sure to click the Save button once you’re done

You should see all of your products in a list, alongside the value for their ‘Hide from Search’ field, which will be set to 0 by default.

Just click into the field and change the value to 1. Do this for all products that you want to hide from search, hit the Save button at the top of the window, and those products will disappear from your site search.

Hopefully this has helped you hide products from Shopify Search. Things change all the time, so if you run into issues, leave a comment below and I’ll aim to get back to you.