Recently I noticed increased SPAM comments on this blog. Numbers are extremely high: more than 50k in a month. Comment spam is a fact of life if you have a blog. If you own a blog, chances are you have encountered a little – or a lot – of spam.
Here is a basic terminology on Comments, Trackbacks, and Pingbacks
- Comments – Comments are created when someone uses the comment form on your blog post to engage with your content.
- Pingbacks – Pingbacks are automatically created when someone links to your blog post from one of their blog posts.
- Trackbacks – Trackbacks are manual notifications by one blogger that they have linked to your blog post within theirs. Pingbacks were created to automate this process.
Well, what should we do to avoid SPAM on WordPress blog? There are lots of plugins, methods available to prevent SPAM comments. I have been using Akismet since beginning. Akismet checks your comments against the Akismet web service to see if they look like spam or not and lets you review the spam it catches under your blog’s “Comments” admin screen. But even with this it failed to stop majority of SPAM comments.
Recently I came across plugin “Cookies for Comments” by by Donncha Ó Caoimh and it’s worth mentioning here. He is the one who created very popular WordPress plugin “WP Super Cache“. It’s been 4 days I’ve installed it and I noticed only 3 SPAM comments compare to ~4000 previously in 4 days.
Basic setting page:
Logic is simple: This plugin will add a randomly generated stylesheet url to your blog’s theme. When a browser requests that stylesheet a cookie is set. If that person then tries to comment, the cookie must be set.
I’ve been using WordPress for many years now and this one is in my top 5 plugins list. Install it. Activate it. Forget about spam.
There is a small bug in this plugin which adds one extra line in your footer (very end) which you can fix by putting below code into your theme’s
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
height:0; /* Chrome */
Happy Blogging and Keep visiting Crunchify.