Introduction
Auto-generated product type pages can sometimes clutter your eCommerce site and dilute your SEO efforts. In this tutorial, we’ll cover how to noindex these pages on Shopify and WooCommerce.
Shopify
To no index auto-generated product type pages in Shopify, you’ll need to add a noindex
meta tag to the specific pages you want to exclude from search engine indexing. Here’s a step-by-step guide:
- Access Your Shopify Admin: Log in to your Shopify admin panel.
- Go to Online Store > Themes: Navigate to your theme by clicking on “Online Store” and then “Themes.”
- Edit Code: Find the theme you are using and click on “Actions” then “Edit code.”
- Locate the Template File: Find the template file for the product type pages you want to no index. This might be a collection template like
collection.liquid
or a custom template if you’re using one. - Add Noindex Tag: Insert the following meta tag within the
<head>
section of the HTML code in the template file:<meta name="robots" content="noindex">
This tag tells search engines not to index the page.
- Save Changes: Save the changes to the template file.
Example: Adding Noindex to a Collection Template
- Edit the Collection Template: Open
collection.liquid
(or any other specific collection template you want to no index). - Insert Noindex Tag:
<!DOCTYPE html> <html> <head> <meta name="robots" content="noindex"> <!-- Other head elements --> </head> <body> <!-- Page content --> </body> </html>
- Save Changes: Save the changes.
Conditional Noindex for Specific Collections
If you want to no index only specific collections, you can add conditional logic. For example, you can use the collection handle to target specific collections:
{% if collection.handle == 'your-collection-handle' %}
<meta name="robots" content="noindex">
{% endif %}
Replace 'your-collection-handle'
with the handle of the collection you want to no index.
Summary
- Access your Shopify admin panel.
- Go to “Online Store” > “Themes.”
- Edit the code of your theme.
- Locate and edit the relevant template file.
- Add the noindex meta tag within the
<head>
section. - Save the changes.
By following these steps, you can effectively control which auto-generated product type pages are indexed by search engines in your Shopify store.
WooCommerce
For WooCommerce, you can use a plugin like Yoast SEO to noindex specific pages. Follow these steps:
- Install and activate the Yoast SEO plugin.
- Go to SEO > Search Appearance.
- Navigate to the Taxonomies tab.
- Find the Product categories and Product tags sections.
- Set the Show Product categories in search results? and Show Product tags in search results? options to No.
This will add a noindex tag to your product type pages, preventing them from being indexed by search engines.
Conclusion
By noindexing auto-generated product type pages, you can keep your eCommerce site focused on the pages that matter most for SEO. Whether you’re using Shopify or WooCommerce, these steps will help you achieve that goal.