Hace unos días escribía un post sobre como Descargar un sitio web completo desde consola con linux.
La solución para evitar a este tipo de problema, que descarguen tu web mediante comandos linux es muy sencilla.
Se ha tomado wget como un crawler (un rastreador) y se puede bloquear desde el archivo robots.txt que es aconsejable tener en el directorio raíz de tu desarrollo.
De manera que para evitar que usen wget de manera recursiva en tu site y lo acaben descargando añadir la siguiente linea en robots.txt
[code]
User-agent: wget
Disallow: /
[/code]
Hay una serie de crawlers, rastreadores o arañas conocidas que se dedican a entrar en tu site y rastrearlo para diferentes motivos, hacer spam, robar contenido, etc..
Es muy aconsejable tener una lista conocida de todos los crawlers maliciosos y bloquearlos directamente.
A continuación añado una lista de crawlers web que he bloqueado, sin piedad! Son los que conozco hasta el momento seguro que hay mas.
[code]
#
# robots.txt
#
User-agent: Orthogaffe
Disallow: /
User-agent: UbiCrawler
Disallow: /
User-agent: DOC
Disallow: /
User-agent: Zao
Disallow: /
User-agent: sitecheck.internetseer.com
Disallow: /
User-agent: Zealbot
Disallow: /
User-agent: MSIECrawler
Disallow: /
User-agent: SiteSnagger
Disallow: /
User-agent: WebStripper
Disallow: /
User-agent: WebCopier
Disallow: /
User-agent: Fetch
Disallow: /
User-agent: Offline Explorer
Disallow: /
User-agent: Teleport
Disallow: /
User-agent: TeleportPro
Disallow: /
User-agent: WebZIP
Disallow: /
User-agent: linko
Disallow: /
User-agent: HTTrack
Disallow: /
User-agent: Microsoft.URL.Control
Disallow: /
User-agent: Xenu
Disallow: /
User-agent: larbin
Disallow: /
User-agent: libwww
Disallow: /
User-agent: ZyBORG
Disallow: /
User-agent: Download Ninja
Disallow: /
User-agent: wget
Disallow: /
User-agent: grub-client
Disallow: /
User-agent: k2spider
Disallow: /
User-agent: NPBot
Disallow: /
User-agent: WebReaper
Disallow: /
[/code]
Muy buen post pero me queda una duda ¿luego como habilitas el acceso del resto de robots, por ejemplo google? Por ejemplo quieres que para el resto si puedan entrar pero a la vez bloquear una url, en concreto como unirías el siguiente robots.txt con tu código anterior:
User-Agent: *
Allow: /
Allow: /rss/$
Disallow: /no_indexar.php?
Sitemap: http://www.dominio.com/sitemap.xml.gz
Gracias 🙂
Primero indicas lo que bloqueas.
Sino bloqueas ningún robots, éste entrará. No hace falta que digas que el robot de google entre. Por defecto cualquier robot puede rastrear tu site.
De hecho no hace falta que pongas el Allow:/ porque como te digo cualquier crawler va a rastrear.
Hola Pedro, por cierto tocayo jeje, quiero bloquear un post en concreto de un blog desde robots.txt, cual es la forma de incluir la url? Gracias de antemano
Buenas,
Entiendo que el post es tuyo, de tu propio dominio. Es muy sencillo tendrías que meter la url del artículo, tipo:
[code]
User-agent: *
Disallow: /categoria-articulo/mi-articulo.html
[/code]
Recientemente he recibido la desagrable visita de Xanu buscando un archivo en concreto para hackearme la web. Afortunadamente no uso FCK, uso otra cosa distinta que hace lo mismo.
La cuestion es que he buscado como bloquear a Xanu y me he encontrado tu post de donde he actualizado algunos bots. Te dejo una lista que tengo en mi .htaccess, seguro que mas de uno la encontrará interesante.
Se puede poner tal cual al final del archivo, si acaso corregir algo o añadir mas, se suele colocar en orden alfabético aunque eso es un detalle sin importancia.
# Block Bad Bots
RewriteCond %{HTTP_USER_AGENT} ^Aboundexbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
RewriteCond %{HTTP_USER_AGENT} ^Bot mailto:[email protected] [OR]
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
RewriteCond %{HTTP_USER_AGENT} ^DOC [OR]
RewriteCond %{HTTP_USER_AGENT} ^Download Demon [OR]
RewriteCond %{HTTP_USER_AGENT} ^Download Ninja [OR]
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^Express WebPictures [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Fetch [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
RewriteCond %{HTTP_USER_AGENT} ^grub-client [OR]
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Image Stripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^Image Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} Indy Library [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
RewriteCond %{HTTP_USER_AGENT} ^Internet Ninja [OR]
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
RewriteCond %{HTTP_USER_AGENT} ^JOC Web Spider [OR]
RewriteCond %{HTTP_USER_AGENT} ^k2spider [OR]
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^libwww-perl [OR]
RewriteCond %{HTTP_USER_AGENT} ^linko [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mass Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} ^MIDown tool [OR]
RewriteCond %{HTTP_USER_AGENT} ^Microsoft.URL.Control [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mister PiX [OR]
RewriteCond %{HTTP_USER_AGENT} ^MJ12bot [OR]
RewriteCond %{HTTP_USER_AGENT} ^MSIECrawler [OR]
RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Net Vampire [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^NPBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline Explorer [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline Navigator [OR]
RewriteCond %{HTTP_USER_AGENT} ^Orthogaffe [OR]
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^Papa Foto [OR]
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^sitecheck.internetseer.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport Pro [OR]
RewriteCond %{HTTP_USER_AGENT} ^TurnitinBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^UbiCrawler [OR]
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web Image Collector [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebGo IS [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website eXtractor [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website Quester [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zao [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zealbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xenu [OR]
RewriteCond %{HTTP_USER_AGENT} ^ZyBORG [OR]
RewriteCond %{HTTP_USER_AGENT} ^ZmEu
RewriteRule .* – [F]
Espero que le sirva a mas de uno.
Saludos.
Alfonso muchísimas gracias por tu comentario y la información que has aportado, por supuesto que a mas de uno le será muy útil.
Un saludo!
Hombre Alfonso, yo te agradezco enormemente tu aportación, que por supuesto hago extensiva a Pedro Ventura por su magnífico trabajo, pero debo decirte que copiando todo ese código en el archivo .htaccess y colocándolo en la raíz del Sitio Web, éste se queda inaccesible para todos los que intenten acceder a él, incluidos los usuarios de a pié.
Un saludo a todos.
Sí, se logra bloquear pero el sitio web queda inaccesible, sale un error. 🙁 que habrá que cambiarle o quitarle para que funcione?
Gracias!
Muchas gracias por los comentarios, son de gran ayuda. Esto es lo que deberíamos hacer todos los que programamos, tratar de proteger nuestro contenido intelectual, obvio sin guardar el conocimiento.
Pedazo de post!!!!
Gracias Pedro por el artículo y a Alfonso por el comentario.
Un saludo.
I am genuinely glad to glance at this webpage posts which contains
plenty of valuable facts, thanks for providing such information.