How to Block Forum Spam
We are assuming you've found this page while trying to learn How to Block Forum Spam
Well lets look at the 2 main forms of forum spam.
- Human Forum Spam
- Forum Spam Bots
Human Forum Spam
Human forum spam is exactly what it sounds like, humans (or people) posting spam in your forum. This is the easiest type to combat. Users post spam in your phpbb or vBulletin forum and you can ban the users ip address, or even ip address range. No biggie. It often doesn't come to that, you can usually warn a user, and really most spammers post and go never to return to your site again. We like these spammers much better than the Forum Spam Bots.
Forum Spam Bots
Forum Spam Bots Suck. That's really all there is to it. They are so frustrating, and to this day there is no full proof method for blocking them. You can integrate a captcha of some form, or even a question like What is 2+4 and some advanced bots can still get through.
So all in all there is no full proof way to block forum spam. Let's look at a few of the more common and semi effective examples below.
Common Forum Spam Blocking Methods
- Block IPs
- Integrate a Captcha
- Adjust Your Registration Forms
- Ask Questions to Users
Each and every connection to the internet has an external ip address. If you are at work and post to a forum your ip is logged. If Joe sitting next to you post to the same forum his ip is also logged, and chances are you will both have the same ip address since you are both on the same network. If bob post some spam on a forum and the admin or mod of that forum chooses to ban his ip address, then neither one of you will be able to post on the forum since your shared ip is blocked.
While this method works fine for blocking human spammers it does nothing for blocking Spam Bots running on hundreds or thousands of hijacked or rogue ips.
Integrate a Captcha
It's always a great idea to Integrate a Captcha into your forum. (see wiki captcha) The basic idea is that bots cannot read images, well most bots that is. Newer more intelligent bots can read the numbers and letters in the images. While captcha is the #1 most effective way to prevent forum bots from attacking, it does not to prevent real humans from spamming your forum.
Adjust Your Registration Forums
Making adjustments to your registration forms is probably the next best thing to a captcha, and when used in combination it can seriously defend your forum against spam bots. Spam bots are nothing more than a program or script that runs a set of directions. A simple set of directions that a bot follows. Change or add a field to the form and you give the bots a hiccup of sorts. The bot is supposed to run a set number of actions. When one of the actions is fill out a specified form and the form doesn't match the bot is unable to perform the task correctly. This is worth a try.
Ask Questions to Users
This could also be considered a continuation of "Adjust Your Registration Forums". You just ask a question like "Are you a human?" or "What color is a Banana?"
Deny IP Ranges with .htaccess
This is fairly complicated and if you don't know what an .htaccess file is then you should either learn before preceding or just skip this option and go for a more simple approach stated above. A basic .htaccess ban command would be something like deny from 184.108.40.206/30 that will not allow users from the ip range 220.127.116.11-18.104.22.168 to access your web page.