Shopify themes, liquid, logos, and UX
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.
Solved! Go to the solution
This is an accepted solution.
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.
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
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 <head> element of the file -> Save
{% if handle contains 'test' %}
<meta name="robots" content="noindex">
{% 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 <head> element of the file -> Save
{% if handle contains 'product1' or handle contains "product2" %}
<meta name="robots" content="noindex">
{% endif %}
Hope my solution works perfectly for you!
Best regards,
Oliver | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
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.
This is an accepted solution.
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.
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
Thank you. I actually knew of this solution for products but didn't know I could use it for individual pages too.
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024