Hide Products from the search functionality

Topic summary

A merchant wants to hide certain custom products from the store’s search functionality while keeping them accessible via direct links for specific customers.

Two main solutions proposed:

  1. Using seo.hidden metafield (Shopify’s native option):

    • Create metafield definition: seo.hidden (Integer type)
    • Set value to 1 for products to hide
    • Important caveat: This hides products from both internal search AND Google/search engines
  2. Custom metafield approach (more targeted):

    • Create custom metafield: custom.hide_from_search (Boolean type)
    • Set to True for products to exclude
    • Modify search.liquid template to filter out products where this metafield is true
    • Requires theme code customization

Key consideration: The seo.hidden method affects all search (internal + SEO), which may be acceptable for products meant only for direct link access. The custom metafield approach offers more granular control but requires template editing.

Summarized with AI on October 23. AI used: claude-sonnet-4-5-20250929.

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

1 Like

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.

2 Likes

: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