• NullPointer@programming.dev
    link
    fedilink
    arrow-up
    19
    ·
    4 months ago

    robots.txt will not block a bad bot, but you can use it to lure the bad bots into a “bot-trap” so you can ban them in an automated fashion.

    • Dave.@aussie.zone
      link
      fedilink
      arrow-up
      9
      ·
      4 months ago

      I’m guessing something like:

      Robots.txt: Do not index this particular area.

      Main page: invisible link to particular area at top of page, with alt text of “don’t follow this, it’s just a bot trap” for screen readers and such.

      Result: any access to said particular area equals insta-ban for that IP. Maybe just for 24 hours so nosy humans can get back to enjoying your site.