How to hide all pages from search results

Topic summary

A Shopify store owner using the Debut theme wants to prevent internal pages from appearing in their site’s search results while keeping products and articles searchable.

Initial Problem:

  • Pages contain internal information not meant for customers
  • Standard SEO hiding methods don’t address on-site search functionality

Technical Solution Provided:
User mit_1 suggested adding a hidden input field to search forms:

<input type=hidden name=type value="product,article">

This code should be placed in search-form.liquid and search.liquid templates, right below the opening <form> tag. It limits search results to only products and articles, excluding pages.

Additional Workarounds:

  • Create an alternate page template with minimal/no content and redirect functionality
  • Add visually-hidden class to page results in search.liquid to hide title and description
  • Use metafields (seo.hidden) to hide from search engines entirely
  • Assign special tags to pages for filtering

Simpler Alternative (Post #14):
Download Shopify’s “Search and Discovery” app, which provides a settings interface to easily select which content types appear in search results—no coding required.

Status: Resolved with multiple working solutions confirmed by the original poster.

Summarized with AI on November 12. AI used: claude-sonnet-4-5-20250929.

HERO!! :smiling_face_with_sunglasses: