Wordpress

Get rid of Spam Comments on WordPress Blog. Here’s How!

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Is your WordPress blog receiving a lot of spam comments? Well, you are not alone! Spam comment is a growing problem. Often websites get a large number of spam comments especially they drive tons of traffic on a regular basis.

Thankfully, WordPress has various ways to get rid of spam comments. In today’s post, we are going to discuss some of the popular methods, useful WordPress plugins and valuable tips to combat comment spam.

1. Activate Akismet

Akismet is a spam comment filtering service, developed by Automattic, a company behind WordPress. It is one of the most popular plugins used to remove comment spam. Akismet filters comment spam as well as pingback spam using different algorithms. The plugin takes the pain out of comment moderation and lets you focus on other important things.

Major features of Akismet:

  1. Automatically checks all comments and filters out the ones that look like spam.
  2. Comes with a discard feature that completely blocks the worst spam on your WordPress website, saving enough space on the disk while speeding up your site.
  3. Stores status history of each comment, so the webmaster can easily check which comments were flagged as spam or filter by Akismet.
  4. Displays URLs in the comment body to exhibit misleading or hidden links.
  5. Displays the number of approved comments of each user to Moderators

2. Hold comments for moderation

Another way of getting rid of spam comments is by holding them for moderation. This allows you to manually check each comment before approving them. If it’s a bot, it won’t get accepted and will stay in moderation. Also, if someone manually adds a link in the comment to get a backlink, you can either mark the comment as spam or simply blacklist.

To enable this option, click settings → discussion. A dialog box will appear with options such as default article settings, other comment settings, email me whenever, before a comment appears and comment moderation.

In “before a comment appears” option, check either “an administrator must always approve the comment” or “comment author must have a previously approved comment” depending on your requirements. And in the comment moderation option, add a number of links you’d allow in the comment.

3. Modifying .htaccess to combat WordPress spam comment

.htaccess is a file that tightens your WordPress website’s security. You can also prevent spam comments on your site by adding a few lines of code to this file.
Add the following code snippet to deny bots with no referrer.

Protect from spam bots

RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post.php*
RewriteCond %{HTTP_REFERER} !.yourwebsite.com.* [OR] RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]

4. Combat spam with Honeypot

Honeypot is yet another popular technology used to effectively stop spam on your WordPress website. In order to use this technology, you will first need to install and activate a plugin “WP Spam Fighter”. Once you have activated this plugin, you will need to enable Honeypot protection by clicking settings → WP Spam Fighter. This will automatically insert a hidden form into your comment section, which will be visible only to bots. Since these bots are programmed to fill in all the fields in a form, you can easily catch the spam with the help of this hidden form.

5. Disable Trackbacks

You may not know a huge chunk of comment spam is trackbacks. For a majority of the website, trackbacks are not even imperative. Thus, you can choose to either disable trackbacks on a particular post/page or on your entire website.

To disable trackbacks, click settings → discussion. In the default article settings, check “Allow link notification from other blogs (pingbacks and trackbacks)”.

Author The Author:

Emily Johns is a web developer and IT consultant at WordSuccor, An Outsource WordPress Development Company. She is dived through open-source code for over a decade and shares everything about WordPress and new Web design technologies. You can find her on Twitter!