How to remove specific pages from storefront search results

Topic summary

A user needed to hide internal pages (containing size guides and text snippets) from their Shopify storefront search while keeping them accessible for product templates. Initial attempts using the seo.hidden metafield failed to affect storefront search results.

Working Solution:

  • Create a custom metafield for pages (e.g., hide_from_storefront_search) with integer values 0-1
  • Modify main-search.liquid by wrapping the search results list item (<li class="grid__item">) with an {% unless item.metafields.custom.hide_from_storefront_search == 1 %} condition
  • Set the metafield to “1” for pages to hide

Key Implementation Detail:
The {% unless %} tag must wrap the entire <li> element (not just the loop start) to prevent empty grid spaces where hidden results would appear.

Known Bug:
The search results counter still includes hidden pages in the total count, showing “5 results” when only 4 are visible. This cosmetic issue hasn’t been resolved.

Status:
Solution confirmed working on Dawn 6.0.2 and Studio theme (version 10.0.0), though one user reported it stopped working after updating Studio to version 11.0.0.

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

Hi, have you try this way?

https://help.shopify.com/en/manual/promoting-marketing/seo/hide-a-page-from-search-engines