Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi, what edits do I need to make to the robots.txt file to allow Google to crawl and index multiple tags?
Example : /collections/demo/tag1+tag2
Currently only /collections/demo/tag1 is allowed, but +tag2 is blocked?
Thanks
This is Richard from PageFly - Shopify Page Builder App
You will need to create a robots.txt for your site in the theme under templates structures first
Then you can exclude it by this
{% for group in robots.default_groups %}
{{- group.user_agent }}
{%- for rule in group.rules -%}
{%- unless rule.value == '/collections/demo/tag2' -%}
{{ rule }}
{%- endunless -%}
{%- endfor -%}
{%- if group.sitemap != blank -%}
{{ group.sitemap }}
{%- endif -%}
{% endfor %}
Hope this can help you solve the issue
Best regards,
Richard | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
Thanks Richard, however how do I do this for this example :
/collections/disney/phone-cases indexes
but
/collection/disney/iphone-11+phone-cases does not. I have thousands of collections, with about 80 different phone models to replace the 'iphone-11'. How do I go about this in a sensible way?
With collection, you can do something like this to get all
Disallow: /collections/*sort_by* Disallow: /*/collections/*sort_by* Disallow: /collections/*+* Disallow: /collections/*%2B* Disallow: /collections/*%2b* Disallow: /*/collections/*+* Disallow: /*/collections/*%2B* Disallow: /*/collections/*%2b*
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024