Robots.txt

El robots.txt es un archivo de texto plano que se ubica en la raíz del sitio web e indica a los buscadores a qué URLs del sitio pueden acceder. Ver más info.

👉Herramienta para probar el robots.txt

Aquí iré poniendo algunas directivas prácticas de robots.txt.

Bloquear imágenes al bot de Google imágenes

Imagen específica

User-agent: Googlebot-Image
Disallow: /tu-url/imagen.jpg

Todas las imágenes

User-agent: Googlebot-Image
Disallow: /

Todas la imágenes de un directorio

User-agent: Googlebot-Image
Disallow: /mi-directorio/

Por extensión

User-agent: Googlebot-Image
Disallow: /*.gif$

Bloquear todas y permitir algunas

User-agent: Googlebot-Image
Disallow: /
Allow: /tu-url/imagen1.jpg
Allow: /tu-url/imagen2.jpg
👉  Web scraping en Pinterest

👇Tu comentario