robots.txt - Bsale-IO/template-docs GitHub Wiki
Versión Agosto 2023
Para cargar el robots en tu ecommerce debes:
- Ir al menú
Tienda en Línea
➡Diseño
➡Archivos
- Buscar el archivo robots.txt
Si no existe lo puedes crear haciendo clic en el botón ➕ (nuevo archivo).
Es importante que el archivo tenga el nombre robots.txt, no puede tener otro nombre
- En dicho archivo debes pegar el siguiente código.
{% if canonical_url contains 'bsalemarket' %}{% comment %} Si la url contiene Bsalemarket se bloquean todos los robots {% endcomment %}
User-agent: *
Disallow: /
{% else %}{% comment %} Si la url NO contiene bsalemarket se cargan los robots {% endcomment %}
# @Bsale 2023 {% comment %} Versión Agosto 2023 {% endcomment %}
{% capture allow %}
Allow: /$
Allow: /product/*
Allow: /collection/*
Allow: /brand/*
Allow: /sheet/*
Allow: /article/*
Allow: /form/*
Allow: /policies/*
Allow: /blog
Allow: /login
Allow: /robots.txt
Allow: /sitemap.xml
Allow: /gateway/plugins/*
Disallow: /*/error/*
Disallow: /*/save/*
Disallow: /
{% endcapture %}
# Buscadores
User-agent: Googlebot {{allow}}
User-agent: Googlebot-image {{allow}}
User-agent: Googlebot-video {{allow}}
User-agent: Googlenot-news {{allow}}
User-agent: Mediapartners-Google {{allow}}
User-agent: AdsBot-Google {{allow}}
User-agent: AdsBot-Google-Mobile {{allow}}
User-agent: AdsBot-Google-Mobile-Apps {{allow}}
User-agent: Storebot-Google {{allow}}
User-agent: Bingbot {{allow}}
User-agent: Applebot {{allow}}
# Redes Sociales
User-agent: FacebookExternalHit {{allow}}
User-agent: Twitterbot {{allow}}
User-agent: LinkedInBot {{allow}}
User-agent: Pinterestbot {{allow}}
# Marketing Robots
User-agent: ia_archiver {{allow}}
User-agent: rogerbot {{allow}}
User-agent: DotBot {{allow}}
User-agent: SiteAudiBot {{allow}} {% comment %} robot auditorias Semrush {% endcomment %}
User-agent: Semrushbot-SI {{allow}} {% comment %} robot auditorias Semrush {% endcomment %}
# Resto de agentes sólo el home
User-agent: *
Crawl-delay:120
Allow: /$
Disallow: /
# Sitemap
Sitemap: {{ sitemap_url }}
{% endif %}
- Si la URL contiene bsalemarket bloquea todos los robots
- De los robots de Google, Bing y Apple permite las páginas de Productos, Colecciones, Marcas, Páginas (sheet), Artículos, robots y sitemap
- De el resto de robots sólo permite la página de inicio.
Test
Puedes revisar si se cargo bien entra a la url de tu web:
tusitio.com/robots.txt
Además puedes revisarlo en estos sitios: