All things Shopify and commerce
Hi All,
We are doing SEO work on a Shopify store and have over 100 404 pages that all have the following url structure: /cdn/shop/files/
We are unable to place simple URL redirects here as we believe the URL has a %7Bwidth% string in it. Shopify have advised us to use a robots.txt file and add in all affected URLs as per this link: https://shopify.dev/docs/themes/seo/robots-txt I've added in a robots.txt.liquid template, but can anyone advise how I would go about adding these URLs to be robots.txt file? Does anyone have any sample robots.txt code they could supply? Here is one of the affected URLs for reference:
https://femfuelz.com/cdn/shop/files/Untitled_design-207_%7Bwidth%7Dx.png?v=1692782218
Hi @Cormac_Kerrigan ,
This is Theodore from PageFly - Shopify Page Builder App.
To tackle the 404 errors and robots.txt configuration in your Shopify store:
1. Identify the Cause of 404s:
2. Create a Custom 404 Error Page (Optional):
Best regards,
Theodore | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Hi, thanks but that's not the question I asked.
How do I edit the robots.txt.liquid file to disallow these specific URLs?
I have tried adding the below code and it gives me an error:
{%- if group.user_agent.value == ‘*’ -%}
{{ ‘Disallow: [/cdn/shop/files/Untitled_design-236_%7Bwidth%7Dx.png?v=1705503886]‘ }}
{%- endif -%}
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey 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, 2024