Skip to main content
Topic: HELP: How To Stop Bots Hitting My Forum (Read 3062 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

HELP: How To Stop Bots Hitting My Forum

Hello, please I need help on how to stop bots hitting my forum.
Many bots have been hitting an attachment in my site and that affected my site once and I think they are increasing my pageviews.

I have removed the topic and attachment but in Who's Online it shows that they keep hitting that attachment though it no longer exists.

Re: HELP: How To Stop Bots Hitting My Forum

Reply #1

Well, page views are affected by any visit, so it's no wonder bots are included (and before you ask, there is not really a safe way to avoid that apart from using external tools for activity tracking).
Who is online (as already explained in other topics, even though I wouldn't remember which one they are, so I'll explain here again) doesn't really show what "someone" (or something) is viewing, but what URL he/it is trying to access, so even if the topic is topic is gone, you may still see someone trying to open it (if there is a link somewhere, or if, like in this case, a bot it hitting always the same URL).
If you really want to stop this page from appearing, you can add an entry in your htaccess to deny access to that particular topic, you take some example from the internet, like:
https://webmasters.stackexchange.com/questions/77168/how-can-i-use-htaccess-to-respond-with-403-forbidden-status-for-urls-that-conta
and put together something like that.
Code: [Select]
RewriteEngine On
RewriteRule ^.*topic=TOPIC_ID.*$ - [R=403,NC,L]
where you replace "TOPIC_ID" with the actual id of the topic.

ETA: BTW, if you are gonna stay behind each and every bot on the internet that decides to hammer a single URL of your website, you'll likely have to stay awake 24/24 and 7/7. ;)
I'd say start worrying when the site goes down because of a DDOS, not before.
Bugs creator.
Features destroyer.
Template killer.

Re: HELP: How To Stop Bots Hitting My Forum

Reply #2

Thanks for the reply. I think I will start using google analytics, I'm not really a coder so I'm afraid I might mess up my .htacess.
Thanks again.

Re: HELP: How To Stop Bots Hitting My Forum

Reply #3

you can use services like incapsula or cloudflare. most malicious bot will be blocked by default.

Re: HELP: How To Stop Bots Hitting My Forum

Reply #4

Quote from: kucing – you can use services like incapsula or cloudflare. most malicious bot will be blocked by default.

I will check them out.

Re: HELP: How To Stop Bots Hitting My Forum

Reply #5

It seems odd they're hitting only a particular attachment and nothing more.  Has someone posted a link to said attachment elsewhere?  That may not be a bad thing.  It could drive some traffic toward your forum.  Most of us actually want that, but it's completely up to you. 

If you're running nginx there is a bad bot blocker script on github.  It works wonderfully!

Re: HELP: How To Stop Bots Hitting My Forum

Reply #6

Quote from: badmonkey – It seems odd they're hitting only a particular attachment and nothing more.  Has someone posted a link to said attachment elsewhere?  That may not be a bad thing.  It could drive some traffic toward your forum.  Most of us actually want that, but it's completely up to you. 

If you're running nginx there is a bad bot blocker script on github.  It works wonderfully!

Okay, thanks.

Re: HELP: How To Stop Bots Hitting My Forum

Reply #7

Quote from: badmonkey – It seems odd they're hitting only a particular attachment and nothing more.
Actually, it's not that unusual.
Once upon a time, at sm.org, it was fun when you were getting random posts hit by bots whose view counter was skyrocketing refresh after refresh (in a matter of 100 views per second or something like that).
Bugs creator.
Features destroyer.
Template killer.

Re: HELP: How To Stop Bots Hitting My Forum

Reply #8

Have you enabled Configuration ⇒ Security and Moderation ⇒ Bad Behavior?

Re: HELP: How To Stop Bots Hitting My Forum

Reply #9

Quote from: Frenzie – Have you enabled Configuration ⇒ Security and Moderation ⇒ Bad Behavior?


No. What will be the effects if I enable it?

Re: HELP: How To Stop Bots Hitting My Forum

Reply #10

It'll block most spammers and link scrapers surprisingly well.

Re: HELP: How To Stop Bots Hitting My Forum

Reply #11

Quote from: Frenzie – It'll block most spammers and link scrapers surprisingly well.


Okay. I will enable it. Thanks.