Hide page (not product page) from site search & from Google

Topic summary

Main issue: Hide a specific non-product page from onsite search and from Google without editing theme code.

Key points:

  • The requester wanted a per-page solution (not all pages), preferably without modifying theme files. Hiding via Google Search Console was acceptable but they sought an in-Store solution.
  • One suggestion proposed editing theme.liquid with a handle-based condition to inject directives. This involves theme code and was explicitly rejected by the requester.
  • Another suggestion recommended using Shopify’s SEO metafield on the page object (seo.hidden), similar to how it’s used for products, with official docs referenced. This approach aims to hide the page from search engines and sitemaps, and is applicable to individual pages.

Outcome:

  • The requester accepted the metafield-based approach, acknowledging they knew it for products and learned it applies to pages as well.

Status:

  • Resolved. Action: Set the seo.hidden metafield on the specific page(s); no theme code changes required.
Summarized with AI on December 30. AI used: gpt-5.

Hi. Is there any way to hide a page, not a product page, from a site search and from Google search results that doesn’t involve editing the theme code, such as what Shopify suggests here.

I’m aware I can hide the page from Google search console, so that’s acceptable, but can I prevent a page from appearing in the site search results? I don’t want to hide all pages, just particular pages.

Thank you.

Hi @hostilearth ,

example: if you want to disable the page with the URL is /pages/test then you can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the after element of the file → Save

{% if handle contains 'test' %}

{% endif %}

example: if you want to disable the page with the URL /products/product1and /products/product2 then you can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the after element of the file → Save

{% if handle contains 'product1' or handle contains "product2" %}

{% endif %}

Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

You can set a metafield on the page object.

Similar to the following link, but that one talks about products, you need to do the same for pages.

https://community.shopify.com/post/1898262

Here is the Shopify doc on this metafield https://shopify.dev/docs/apps/marketing/seo#step-2-hide-a-resource-from-search-engines-and-sitemaps

I specifically asked for a solution that didn’t involve editing the theme code. I even linked to the solution you wrote out, saying I didn’t want that solution.

Thank you. I actually knew of this solution for products but didn’t know I could use it for individual pages too.