Spam pollutes platforms with unwanted content, from promotional messages to malicious links. Effective spam detection combines content analysis, behavioral signals, and reputation scoring.
Content-Based Spam Signals
Spam often contains: excessive links (especially to unknown domains), keyword stuffing, ALL CAPS text, excessive punctuation (!!!), copied/duplicate content, and promotional language. Spam detectors analyze these patterns. Legitimate content occasionally triggers these signals, so use scoring rather than binary yes/no. Content scoring 70+ on spam indicators warrants review.
Behavioral and Rate-Based Detection
Spammers exhibit patterns: posting at inhuman speeds (multiple posts per second), creating new accounts in bulk, posting identical or near-identical content repeatedly, and ignoring responses (automated bots). Rate limiting (max 5 posts/minute) and velocity checks (account created <1 hour ago posting heavily) catch many spammers.
Link and Domain Analysis
Check links against spam databases (Google Safe Browsing, PhishTank). New domains (<30 days old) are higher risk. Excessive links or links to unrelated domains indicate spam. Shortened URLs (bit.ly, tinyurl) may hide spam destinations—expand and check final URLs. Block links to known spam domains automatically.