I am building a website with user generated comments. In order to implement user moderation/spam-protection, users have the ability to mark comments as spam. When one comment is marked as spam, I want all comments from the same IP address to be deleted.

I am not familiar with spam prevention in general, other than Captcha.


  • is this a feasible/good system for spam prevention?
  • are there better ways, or improvements I can make?


1 Answer 1


is this a feasible/good system for spam prevention?

No, for a variety of reasons - chiefly:

IP address assignments change over time. Do you want to delete posts from 2011 in the year 2015 because a spammer was assigned an IP which had seen use prior?

Malicious flagging happens. Do you want a few malicious posts to interfere with comments from one of your community's top posters?

... etc.

are there better ways, or improvements I can make?

Spam is pandemic and hard to deal with... it's an arms race and spammers have strong financial incentives to continue spamming.

Services like ReCAPTCHA and Akismet are dedicated to fighting this battle - they're good at it and they have an incentive to stay good at it.

Unless you want to spend time engineering and re-engineering your solution over time to fight spam, I doubt you want to fight this battle... but if you feel compelled to take on the spammers, here is how you might go about it:

Require verified user accounts - This means you will need to collect data from your users and verify that data (whether it be an e-mail address, payment information, or a phone number).

Avoid automated destructive actions - Don't delete anything until a moderator has had a chance to review the merit of user-reported spam. An example: vBulletin comment flagging and moderation.

Slow spammers' roll. Spammers prefer hit-and-run opportunities over creating accounts, but they will create accounts if it means immediate access to post at will. Consider implementing a "no links for accounts with less than 5 posts" rule to weed out spammers (they won't stick around to meet that limit unless they're particularly desperate) and a "+3 posts/day quota" for new user accounts (i.e. user can post 3 times on his or her first day, 6 times on the second, and so on).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.