Robots.txt file errors

Robots.txt file errors

bk1
Visitor
1 0 0

Image below is my robots.txt I have just created from the Shopify template. However, the image at the very bottom shows the errors and I am not sure how to fix this on my robots file. Shouldn't there be 'allow' and 'disallow' on this coding

 

Capture62.PNG

Capture73.PNG

Reply 1 (1)

EcomGraduates
Shopify Partner
735 63 105

If you want to add specific rules like 'allow' or 'disallow', you’ll need to insert them within the loop that processes the rules. Here’s an example of how you can add those:

 

 

{% for rule in group.rules %}
    {{ rule | replace: 'Disallow:', 'Disallow: /path' }} 
    {{ rule | replace: 'Allow:', 'Allow: /path' }}
{% endfor %}

 

 

If you have specific paths you want to allow or disallow, you should specify them explicitly within the rules section. If you just want the default behavior, Shopify might handle it automatically, but you can manually adjust it if needed.


If this fixed your issue, likes and accepting as a solution are highly appreciated.

Build an online presence with our custom built Shopify Theme EcomifyTheme