Best 2 Know

The Ultimate Blogging Resource

  • Advertising
  • WebHosting
  • Contact Us
  • Blogger
    • Blogger Templates
    • Blogger Tutorials
  • Browser
    • Firefox
    • Google Chrome
  • Google
  • Internet
    • Facebook
    • Twitter
  • Thesis
  • Windows
  • WordPress
    • WordPress Themes
    • WordPress Plugins
  • More
    • Linux
    • Review
    • Solutions
    • Announcements

4 Ways to Reduce Spam Comments

We all do hate Spam Comments on our WordPress blog but you might have read my earlier post regarding How to get Rid of spam comments, Well if you haven’t you should its worth a look, well after that technique the Spam’s where minimal but again after some time I started receiving few Spam Comments so then I came again with a research and found 4 Ways to Reduce Spam Comments

Well let’s get started on our way to Reduce Spam Comments and make our blog SPAM FREE

1. Using Different Comment Systems

Well if you are getting Swamped with Spam comments then I guess you should definitely give a try to Other Third Party Comment Systems Such as Disqus or JetPack Comments, This systems helps to prevent mostly automated Spams that are made using Spam bots and there are also other benefits to them that they help to keep our visitors Engaged to the website so its kind of Double bonus

Well you might have seen me using Disqus Comment System Recently on my blog, I really liked it and it helped engaging visitors into the site and it reduced a bit of Bounce Rate because of that.

2. Disabling Direct Access

Well even after using Disqus as my comment System, I still received a Spam comment in my WP Dashboard that’s when I came to realize that someone is directly accessing wp-comments-post.php it is a file through which our default comment form posts comments, so I thought of disabling its access by adding the below code in .htaccess file :

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

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

Well the Other Two Methods that I found practically those are good but I haven’t used them.

3. Cookies for Comments Plugin

The plugin adds a stylesheet or image to your blog’s html source code. When a browser loads that stylesheet or image a cookie is dropped. If that user then leaves a comment the cookie is checked. If it doesn’t exist the comment is marked as spam.

— Donncha O Caoimh – Plugin Author

It also has a feature were it checks how much time it took to post the comment after the post is loaded, if it is under 3 seconds then it Marked as Spam. the plugin helps prevent both Automated and Manual Spams, it should be only used with Default comment System otherwise you will end up wasting resources.

4. Using CheckBox to Send Comments

This technique is kind of a old School trick but it does its work very well, in this technique we will add a Checkbox to our Default Comment form, that will have to be ticked before Posting a Comment. This will prevent only from automated Spams and does not hurt the real commenters, add the below code in comments.php above the submit button would be recommended

<label for="enable"><input type="checkbox" name="enable" id="enable" onClick="apply()" class="enable_checkbox">Confirm you are Human</label>

<label for="enable"><input type="checkbox" name="enable" id="enable" onClick="apply()" class="enable_checkbox">Confirm you are Human</label>

And add the below code in functions.php :

function checkbox_comments() { ?>
<script type="text/javascript">
function apply() {
var form_submit = document.commentform.submit;
var form_checkbox = document.commentform.enable;
form_submit.disabled=true;
if(form_checkbox.checked==true) {form_submit.disabled=false;}
if(form_checkbox.checked==false) {form_submit.enabled=false;}
}
</script>
<?php }
add_action('wp_head', 'checkbox_comments');

function checkbox_comments() { ?> <script type="text/javascript"> function apply() { var form_submit = document.commentform.submit; var form_checkbox = document.commentform.enable; form_submit.disabled=true; if(form_checkbox.checked==true) {form_submit.disabled=false;} if(form_checkbox.checked==false) {form_submit.enabled=false;} } </script> <?php } add_action('wp_head', 'checkbox_comments');

Well we end it here for today, I hope you have found your Best method to Reduce Spam Comments and please do share your experience with us.

Also Read : How to get Rid of spam comments

Subscribe via Email

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to print (Opens in new window) Print
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to email a link to a friend (Opens in new window) Email

Related

December 7, 2012 Ritesh Sanap Solutions, WordPress, WordPress Plugins Spam, Spam comment, spam comments, wordpress

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post navigation

Previous Previous post: How to Delete a FaceBook Page
Next Next post: Windows 8 Shortcut Keys

Currently Trending

  • How to download Specific parts of YouTube videos
    How to download Specific parts of YouTube videos
  • Windows Vista CD key
    Windows Vista CD key
  • How to retrieve my Demonoid username
    How to retrieve my Demonoid username
  • How to add Logo to Thesis theme
    How to add Logo to Thesis theme
  • How to Delete Feedbacks from JetPack Contact Form
    How to Delete Feedbacks from JetPack Contact Form
  • List Of All 255 Keyboard All Alt Key Codes
    List Of All 255 Keyboard All Alt Key Codes
  • h4x0r ( Hacker ) - Blogger Template
    h4x0r ( Hacker ) - Blogger Template

Get Latest post in your Inbox

Random Posts

Read More hack for Blogger with automatic Thumbnail creator script

May 17, 2009 By Ritesh Sanap 5 Comments

Convert Your Windows To MAC

July 9, 2008 By Ritesh Sanap Leave a Comment

Bypassing Word Verification for links in Orkut

February 29, 2008 By Ritesh Sanap Leave a Comment

How to show Adsense in your Posts

February 27, 2011 By Ritesh Sanap 1 Comment

How to find best Web Hosting – WebHostGear

March 15, 2011 By Ritesh Sanap Leave a Comment

WordPress

HTTP2 Server Push for W3 Total Cache Minify plugin

August 17, 2016 By Ritesh Sanap 5 Comments

How to Disable Emojis in WordPress

January 6, 2016 By Ritesh Sanap Leave a Comment

JetPack Related posts and Sharing not working with NGINX

November 10, 2015 By Ritesh Sanap Leave a Comment

Simply Pure – WordPress Theme

November 2, 2014 By Ritesh Sanap 2 Comments

Advanced What should we Write about next? – WordPress Plugin

July 28, 2014 By Ritesh Sanap Leave a Comment

How to Disable Self Pingback or TrackBack

January 16, 2014 By Ritesh Sanap Leave a Comment

BlueStrap – WordPress Theme

January 1, 2014 By Ritesh Sanap 15 Comments

How to Create Multiple Excerpts in WordPress

December 24, 2013 By Ritesh Sanap Leave a Comment

How to Disable Auto Update in WordPress

November 21, 2013 By Ritesh Sanap Leave a Comment

How to Delete Feedbacks from JetPack Contact Form

November 19, 2013 By Ritesh Sanap 9 Comments

Recent Posts

  • HTTP2 Server Push for W3 Total Cache Minify plugin
  • How to show hidden files and folders in Mac OS X
  • How to Disable Emojis in WordPress
  • Canva – Online Photo Editor
  • JetPack Related posts and Sharing not working with NGINX

Archives

Recommends

  • DigitalOcean – Cloud Hosting
  • Dropbox – Cloud Storage
  • Elegant Themes – WordPress Themes
  • LastPass – Password Manager
  • Like us on Facebook
  • Follow on Twitter
  • +1 on Google
  • Subscribe via Email
  • RSS Feed

© 2025 Best 2 Know · All Rights Reserved · We ♥ DigitalOcean