All things Shopify and commerce
Hello,
I want to remove all of my product pages from Google.
I still want to keep homepage, collections, blogs, etc. I would just like to remove the product pages.
Any suggestions on the best way to do this without downloading a paid app?
Thanks!
Solved! Go to the solution
This is an accepted solution.
Hi @MaxL
To add a noindex tag to the product page in Shopify using Liquid, you can follow these steps:
Open your theme editor:
Edit theme.liquid:
Add the noindex tag:
{% if template.name contains 'product' %}
<meta name="robots" content="noindex">
{% endif %}
This code checks if the current page is a product page and, if so, adds a noindex tag to the page, instructing search engines not to index it.
Now, your product pages should include a noindex tag, which tells search engines not to index those pages.
If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
Makka
This is an accepted solution.
Hi @MaxL
To add a noindex tag to the product page in Shopify using Liquid, you can follow these steps:
Open your theme editor:
Edit theme.liquid:
Add the noindex tag:
{% if template.name contains 'product' %}
<meta name="robots" content="noindex">
{% endif %}
This code checks if the current page is a product page and, if so, adds a noindex tag to the page, instructing search engines not to index it.
Now, your product pages should include a noindex tag, which tells search engines not to index those pages.
If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
Makka
Thanks so much! Perfectly explained 🙂
Have a great day!
@MaxL Go to Edit Code > open theme.liquid file > search for <head> tag and under it paste below code and save.
{% if template.name contains 'product' %}
<meta name="robots" content="noindex,nofollow">
{% endif %}
if this solves the problem, please Mark it as Solution!
Hello @MaxL
Go to Online Store > Themes > Actions > Edit Code > theme.liquid.
Add the following code inside the <head> tag:
{%- if template contains 'product' -%}
<meta name="robots" content="noindex, nofollow">
{%- endif -%}
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