77
submitted 4 months ago by CynicusRex@lemmy.ml to c/privacy@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] Asudox@lemmy.world 111 points 4 months ago

Block? Nope, robots.txt does not block the bots. It's just a text file that says: "Hey robot X, please do not crawl my website. Thanks :>"

[-] Oha@lemmy.ohaa.xyz 60 points 4 months ago

I disallow a page in my robots.txt and ip-ban everyone who goes there. Thats pretty effective.

[-] JackbyDev@programming.dev 16 points 4 months ago

Did you ban it in your humans.txt too?

[-] bountygiver@lemmy.ml 18 points 4 months ago* (last edited 4 months ago)

humans typically don't visit [website]/fdfjsidfjsidojfi43j435345 when there's no button that links to it

[-] Avatar_of_Self@lemmy.world 16 points 4 months ago

I used to do this on one of my sites that was moderately popular in the 00's. I had a link hidden via javascript, so a user couldn't click it (unless they disabled javascript and clicked it), though it was hidden pretty well for that too.

IP hits would be put into a log and my script would add a /24 of that subnet into my firewall. I allowed specific IP ranges for some search engines.

Anyway, it caught a lot of bots. I really just wanted to stop automated attacks and spambots on the web front.

I also had a honeypot port that basically did the same thing. If you sent packets to it, your /24 was added to the firewall for a week or so. I think I just used netcat to add to yet another log and wrote a script to add those /24's to iptables.

I did it because I had so much bad noise on my logs and spambots, it was pretty crazy.

[-] Mikelius@lemmy.ml 10 points 4 months ago

This thread has provided genius ideas I somehow never thought of, and I'm totally stealing them for my sites lol.

[-] JackbyDev@programming.dev 14 points 4 months ago* (last edited 4 months ago)

I LOVE VISITING FDFJSIDFJSIDOJFI435345 ON HUMAN WEBSITES, IT IS ONE OF MY FAVORITE HUMAN HOBBIES. ~~🤖~~👨

[-] LazaroFilm@lemmy.world 9 points 4 months ago
[-] JackbyDev@programming.dev 25 points 4 months ago

Imagine posting a rule that says "do not walk on the grass" among other rules and then banning anyone who steps on the grass with the thought process that if they didn't obey that rule they were likely disobeying other rules. Except the grass is somewhere that no one would see unless they actually read the rules. The rules were the only place that mentioned that grass.

[-] vk6flab@lemmy.radio 7 points 4 months ago

Is the page linked in the site anywhere, or just mentioned in the robots.txt file?

[-] Oha@lemmy.ohaa.xyz 10 points 4 months ago
[-] vk6flab@lemmy.radio 8 points 4 months ago

Excellent.

I think I might be able to create a fail2ban rule for that.

[-] Asudox@lemmy.world 5 points 4 months ago

Not sure if that is effective at all. Why would a crawler check the robots.txt if it's programmed to ignore it anyways?

[-] Oha@lemmy.ohaa.xyz 16 points 4 months ago

cause many crawlers seem to explicitly crawl "forbidden" sites

[-] Crashumbc@lemmy.world 3 points 4 months ago

Google and script kiddies copying code...

[-] MangoPenguin@lemmy.blahaj.zone 1 points 4 months ago

You could also place the same page as a hidden link on your home page.

[-] AceFuzzLord@lemm.ee 4 points 4 months ago

I doubt it'd be possible in most any way due to lack of server control, but I'm definitely gonna have to look this up to see if anything similar could be done on a neocities site.

[-] spookedintownsville@lemmy.world 2 points 4 months ago

Can this be done without fail2ban?

[-] MangoPenguin@lemmy.blahaj.zone 1 points 4 months ago

Should be able to do it with Crowdsec

[-] Oha@lemmy.ohaa.xyz 1 points 4 months ago
[-] spookedintownsville@lemmy.world 2 points 4 months ago

How did you do it? Looking to do this on my own site.

[-] Oha@lemmy.ohaa.xyz 3 points 4 months ago

My websites Backend is written in flask so it was pretty easy to add

[-] ExtremeDullard@lemmy.sdf.org 45 points 4 months ago

Robots.txt is honor-based and Big Data has no honor.

[-] CynicusRex@lemmy.ml 13 points 4 months ago

Unfortunate indeed.

“Can AI bots ignore my robots.txt file? Well-established companies such as Google and OpenAI typically adhere to robots.txt protocols. But some poorly designed AI bots will ignore your robots.txt.”

[-] breadsmasher@lemmy.world 23 points 4 months ago

typically adhere. but they don’t have to follow it.

poorly designed AI bots

Is it a poor design if its explicitly a design choice to ignore it entirely to scrape as much data as possible? Id argue its more AI bots designed to scrape everything regardless of robots.txt. That’s the intention. Asshole design vs poor design.

[-] majestictechie@lemmy.fosshost.com 7 points 4 months ago

This is why I block in a htaccess:

# Bot Agent Block Rule
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (BOTNAME|BOTNAME2|BOTNAME3) [NC]
RewriteRule (.*) - [F,L]
this post was submitted on 18 Aug 2024
77 points (76.9% liked)

Privacy

32465 readers
433 users here now

A place to discuss privacy and freedom in the digital world.

Privacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy.

In this community everyone is welcome to post links and discuss topics related to privacy.

Some Rules

Related communities

much thanks to @gary_host_laptop for the logo design :)

founded 5 years ago
MODERATORS