NoIndex all products

Solved

NoIndex all products

MaxL
Shopify Partner
2 0 0

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!

Accepted Solution (1)

theycallmemakka
Shopify Partner
1813 439 474

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:

  1. Open your theme editor:

    • Go to your Shopify admin.
    • Navigate to Online Store > Themes.
    • Find the theme you want to edit and click on Actions > Edit code.
  2. Edit theme.liquid:

    • In the Layout section, find theme.liquid.
    • Open the theme.liquid file.
      theycallmemakka_0-1724907761453.png

       

  3. Add the noindex tag:

    • Add the following Liquid code inside the <head> section of your theme's theme.liquid  file:

 

{% 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.

  1. Save your changes:
    • After adding the code, click Save.

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

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

View solution in original post

Replies 5 (5)

theycallmemakka
Shopify Partner
1813 439 474

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:

  1. Open your theme editor:

    • Go to your Shopify admin.
    • Navigate to Online Store > Themes.
    • Find the theme you want to edit and click on Actions > Edit code.
  2. Edit theme.liquid:

    • In the Layout section, find theme.liquid.
    • Open the theme.liquid file.
      theycallmemakka_0-1724907761453.png

       

  3. Add the noindex tag:

    • Add the following Liquid code inside the <head> section of your theme's theme.liquid  file:

 

{% 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.

  1. Save your changes:
    • After adding the code, click Save.

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

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

MaxL
Shopify Partner
2 0 0

Thanks so much! Perfectly explained 🙂 

 

Have a great day!

saim007
Shopify Partner
619 75 110

@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!

Saim | Shopify Partner Expert

Was I helpful?

Buy me a Coffee

🙂
Hire me   to unlock the full potential of your e-commerce store 🙂

oscprofessional
Shopify Partner
16407 2444 3195

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 -%}

 

 

Hire us | Pass Core Web Vital | B2B Wholesale Experts | Claim Your Free Website Review |
Connect with Us: WhatsApp | Skype: oscprofessionals-87 | Email: pallavi@oscprofessionals.com |
Custom Shopify SolutionsPrivate Apps, Theme Customization & SEO | Digital Marketing |
OSCP Apps: Discount Suite | Wholesale App | Bundle & Upsell | Shipping Discount | and more...
vmms24
Excursionist
42 1 4

hello, this is not working for me, after i add the code, the prduct page doesnt have any noxindex tag when inspecting the code, any suggestion? Thanks