preventing .text blog spam using triggers

I’ve been having a problem with comment spam lately — spammers using the blog’s comment functionality to post links which will get indexed by google and artificially boost their page-rank.

A) Google has announced, with support from MSN and Yahoo, rel=”nofollow” which should lower the incentive for spammers using this technique. The .TEXT version requires a recompile at the moment and I’m not running the source based install, so I’ll have to wait a while before implementing this.

B) A HIP-CAPTCHA Control can be added to .TEXT to make it v.difficult for spammers to automate posting. Clearscreen SharpHIP. I have chosen to skip this technique for now.


C) Preventing .Text blog spam using triggers. This is what I’ve gone with so far. Since all this blog content goes into a SQL Server 2000 DB, it is easy enough to add a trigger which checks for known spam titles and a high occurrence of HTTP in the comment data. Many thanks to Chrissy LeMaire for the code. Now that I look, it seems she is ALL-OVER this problem. Please email me separately if you post a comment that gets eaten by this filter accidentally. I’m terrified of false positives while spam filtering. Which is why I use Cloudmark SafetyBar (no false positives) for mail BTW.



  1. hahah "ALL-OVER". My OCD is showing, eh?

    If you are terrified of false positives, you may want to look into the script that actually keeps track of the spam.

    There are other posts that have ASP scripts that help you keep track of the spam ala

    And finally, as you may have seen, I’ve added two huge scripts that incorporate a global blacklist, personal blacklist and personal whitelist 🙂

Leave a comment

Your email address will not be published. Required fields are marked *