Hide Products from the search functionality

Hi,

I have some custom products that are only available to some customers via a link.

I need to hide these from the search at the top of the page.

I have seen a lot around using metafields, but I do not have the Namespace.Key that is referenced in a lot of the previous topics.

Any advice would be appreciated

Hi @Jack020895 ,

It’s possible to achieve this using a tag and a metafield, but it will also require some customization in the search template. If you’d like me to handle it, please share the collaborator code so I can edit the theme accordingly.

Thanks!

Hi @Jack020895

To exclude certain products from appearing in your store’s search results, you may consider trying the solution provided by Shopify Support, which is that you can use a custom metafield called seo.hidden. Please follow the steps below to set it up and apply it:

Step 1: Create the Metafield Definition

  1. From your Shopify admin, go to Settings > Metafields and metaobjects.

  2. Select Products.

  3. Click Add definition.

  4. In the Name field, enter: SEO Hidden.

  5. For Namespace and key, enter: seo.hidden.

  6. Set the Content type to: Integer.

  7. Click Save.

Step 2: Apply the Metafield to Specific Products

  1. Navigate to the product page in your Shopify admin.

  2. Locate the SEO Hidden metafield under the Metafields section.

  3. Enter the value 1 to hide the product from search.

  4. Click Save.

Products with seo.hidden set to 1 will not appear in your storefront search or on search engines. However, the direct product URL will still be accessible and can be shared with specific customers as needed.

Thank you.

:bomb:
Note that this is all or nothing affecting both instore search and SEO from google

In this case this seems to be an okay situation just be aware of it

Hey @Jack020895 ,

You can easily hide specific products from search by creating a product metafield and then excluding it in your search results template.

  1. Go to Settings > Custom data > Products > Add definition
    • Namespace and key: custom.hide_from_search

    • Type: Boolean (True/False)

  2. In each product you want hidden, set Hide from search = True.
  3. In your search.liquid or predictive search code, wrap the product output with:
  4. {% unless product.metafields.custom.hide_from_search == true %}
      <!-- show product -->
    {% endunless %}
    
    

That will remove those products from all search results.

Best Regards,

Rajat

The seo.hidden metafield works, but as others mentioned, it hides the product from both internal search and Google — which wasn’t ideal for me. What ended up working better was using a small hide-logic app instead of editing theme code. It let me hide selected items from search results only, without affecting SEO visibility or having to modify templates.

If you prefer a no-code option, this one shopify has been reliable for my setup