Hi @houseofviraasi , thank you for posting here!
The issue of filter tags appearing in Google search results instead of your collections likely occurs because Shopify generates URLs for your filter tags, and Google is indexing these URLs. This can happen due to a lack of control over how search engines are crawling and indexing these tag URLs. Here’s how you can fix it:
1. Prevent Filter Tags from Being Indexed
You can use the robots.txt.liquid file in Shopify to block search engines from indexing these tag URLs. To do this:
-
Go to Online Store > Themes > Actions > Edit Code.
-
Search for the robots.txt.liquid file.
-
Add a directive to disallow the tag URLs:
User-agent: *
Disallow: /collections/*?*tag=
-
Save the file.
This tells search engines not to index URLs containing ?tag=.
2. Use Canonical Tags
Ensure that your Shopify collections have proper canonical tags that point to the primary collection URL. Shopify typically generates these automatically, but you can check them:
-
Go to your Online Store > Themes > Actions > Edit Code.
-
Open the collection.liquid file or any relevant layout file.
-
Look for the canonical tag:
<link rel="canonical" href="{{ collection.url }}">
-
If missing or incorrect, add or fix it to ensure Google recognizes the main collection URL.
3. Update Google Search Console
Submit your sitemap to Google Search Console to help it understand which pages you want indexed:
- Go to Google Search Console > Index > Sitemaps.
- Enter the sitemap URL for your store (e.g., https://yourstore.com/sitemap.xml).
- Request a recrawl for your site.
4. Check and Update Internal Linking
Ensure that your internal links (menus, breadcrumbs, etc.) link directly to the collection pages instead of filtered/tagged URLs.
- Go to Online Store > Navigation and review your menus.
- Replace any filtered/tagged URLs with the main collection URLs.
5. Request Removal of Indexed Tags
For any tag URLs already indexed, use Google’s URL Removal Tool to request their removal:
- Go to Google Search Console > Index > Removals.
- Use the Temporary Removals tab to submit the unwanted URLs for removal.
6. Ensure Tag URLs Are No-Indexed
If you can’t prevent tag URLs from being created, you can add a noindex meta tag to these pages:
-
Go to Themes > Actions > Edit Code.
-
Find the relevant template file generating the tag URLs, such as collection.liquid.
-
Add the noindex meta tag for pages with tags:
{% if current_tags %}
<meta name="robots" content="noindex">
{% endif %}
-
Save the changes.
Please press ‘Like’ and mark it as ‘Solution’ if you find it helpful. Thank you.