Stopping WordPress Trackback SPAM


Spamming is a hard job. Spamming blogs is even harder. I’ll save you the colorful description of what I think of the people that do this, and as of late a particular site ( has been a big thorn in my side. It’s your typical Adwords scumbag, trying to get links any way possible so someone would accidentally click on some of the ads and bring them a quarter.

So how does one get rid of this site, or perhaps any site, you don’t want trackbacks from via WordPress? Simple, just edit your wp-trackback.php and add this somewhere towards the bottom of the script (make sure you’re not putting it inside any other if { } statements:

if (preg_match(“/\\b/i”, $tb_url))

Pretty simple. Save the file and you’re done. This can work in a number of ways, all that regexp looks for is presence of “” string in the URL that the splogger is using. I don’t know why I didn’t do this sooner, its certainly faster than nuking a blog comment.