How to hide products from your Shopify store’s search and Google without deactivating them
Sometimes, you might want to keep certain products active in your Shopify store (for example, to offer them as free gifts) but prevent them from showing up in the store’s search results or on search engines.
Shopify provides a built-in product metafield with the namespace and key seo.hidden
, which allows you to do this easily. Let’s go through the steps to set up this metafield and understand how it works.
Note: If you aren’t familiar with metafields at all, we recommend going through one of our previous articles on How to display additional product information on your store? Use integrated Shopify metafields. (Themes 2.0. and vintage themes)
How to set up the product metafield
The setup is simple. Just follow these following steps:
- Go to Settings → Custom data.
- Select Products, then click the black Add definition button.
- Name your metafield (e.g., Hide from search).
- Use the predefined namespace and key: seo.hidden (do not use any other value).
- (Optional) Add a description.
- Set the metafield type to Integer and One value (as shown in the screenshot below).
- Leave the other settings as they are.
How to apply the metafield to products
Once the metafield is set up, you need to assign it to the products you want to hide:
- Go to Products and select the product you want to hide.
-
Scroll down to the Metafields section.
- You should now see your newly created Hide from search metafield in the list.
-
Click on it and enter 1.
- Save your changes, and you’re done!
What happens when you use the seo.hidden metafield?
- It will no longer appear in your store’s search results.
- Shopify will exclude the product from your store’s sitemap.
- Shopify will automatically add
<meta name="robots" content="noindex, nofollow">
to the product page, instructing search engines not to index or follow the page.
By following these steps, you can keep certain products active in your Shopify store while ensuring they stay hidden from store’s search and search engines. This is especially useful for free gifts, exclusive offers, or private listings.
If you ever need to make a hidden product visible again, simply remove the 1 from the Hide from search metafield, and you’re all set!