9 ways to stop spam comments on WordPress Blog

Join InfoPhilic Community!

Let's build a community to help & encourage each other to grow!

Are you getting more spam comments on your WordPress blog? If yes, it’s not only you who face this issue. Every blogger faces this problem.

Spam comments are the major problem in the WordPress blog. It has a bad impact on the Google search rank. There is a plugin named Akismet is the best solution to overcome this issue. But during the registration, it asks for the credit card details. Every blogger doesn’t have a credit card. So here are some ideas to stop spam comments who don’t own a credit card. 🙂

1. Remove Website URL Field from Comment Form:

Comment systems are used for discussing article related stuff but some people use it to promote their own websites. They drop some useless comments to promote their products or websites. I call them manual spammers.

This happens due to the presence of the website field in the comment form. This field not only invites bot spammers but also the manual spammers as I said above.

You might have seen appreciating comments like a nice article, I have bookmarked your blog, and you are such talented blogger and more. These are just spam comments. New blogger generally gets influenced by such comments and approved them.

Such commentators don’t even read your articles, they just come on your article drop spam comments for self-promotion and left.

To overcome this you can disable the website field in your WordPress comment form.

2. Disable Comments on Media Attachments:

WordPress auto generates attachment pages where users can drop comments. As having images on your blog is a part of good SEO, you can’t stop using images. So you can simply disable comments on the attachment pages. Simply paste the following code in theme’s functions.php file.  You can also redirect attachments to the article using Yoast SEO plugin to fix this issue.

// Disable Comments on Media Attachments
add_filter( 'comments_open', 'filter_media_comment_status', 10 , 2 );
function filter_media_comment_status( $open, $post_id ) {
 $post = get_post( $post_id );
 if( $post->post_type == 'attachment' ) {
return false;
 return $open;

3. Add CAPTCHA Verification:

Use the WP-reCAPTCHA plugin to stop spam comments. This plugin adds verify code option in comment form which shows text or numeric image to verify humanity while commenting. This idea helps you to stop spam comments by bots.

4. No-follow comments links:

Newbie bloggers add do-follow author link to get more comments. But remember this is an invitation for more spam. So always use no-follow links. It reveals true commentator.

5. Disable trackbacks:

What are Trackbacks and Pingbacks in WordPress? Trackback is a big issue for spam. You can easily disable it from your WordPress dashboard.
To disable follow following steps.

  1. Open WordPress Dashboard
  2. Under SETTINGS select Discussion
  3. Remove the tick from Allow link notifications from other blogs (pingbacks and trackbacks) on new articles
  4. Save changes

Disable trackbacks to stop spam comments
Disable trackbacks

6. Block Sexual and Offensive Words

You might have noticed most of the spam comments contents offensive or sexual words. Most of the illegal website’s domain has such words. It is bad for the blog reputation. So you can block comments containing such word just by adding a list of such words in the comment blacklist under the discussion settings.

Comment backlist
Comment backlist

Note: One word per line. 

You can also block certain IP address using the above method. Just put IP you wanna ban in the blacklist. and save the settings.

7. Turn Off Comments on Old Posts:

WordPress has an inbuilt feature to auto turn off comments after certain days. To enable this follow:

  1. Go to the WordPress dashboard
  2. Settings
  3. Discussion settings
  4. Other comment settings
  5. Save

Disable comments to stop spam comments
Disable comments

You can change several days up to 100 to automatically close comments on articles.

8. Stop Spam Comments Using .htaccess

If you getting more spam comments from a certain IP address, you can block it using .htaccess. Simply add the following code in your root .htaccess

<Limit GET POST>
order allow,deny
deny from xxx.xxxx.xxx.xxx
deny from xxx.xxxx.xxxx.xxx
allow from all

You have to replace xxx.xxx.xxx.xxx with the IP address you wanna block. You can add multiple IP addresses in same code

9. Use the third-party comment systems

You can use third-party comments system to stop spam comments on your blog. There are various comments plugins available. Some of them are listed below:

So, this is how you can stop spam comments on your WordPress blog. All you need to modify .htaccess and functions.php file.

Subscribe to our newsletter

To be updated with all the latest news, offers and special announcements.

Comment Policy: Your words are your own, so be nice and helpful if you can. Please, only use your real name and limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.


Please enter your comment!
Please enter your name here


Start WordPress Blog: Ultimate Guide For Beginners

Here is our step by step guide for beginners to start a WordPress blog.

Top 6 Best WordPress Theme Frameworks

There are many websites themes which are created by using a framework. Likewise, WordPress Theme frameworks also becoming so popular. The framework allows you...

The Most Essential WordPress Plugins

Here, I have listed some excellent plugins which will surely add more features and new functionality to your WordPress blog.

Tips to Speed Up WordPress Performance

Here, I am sharing some tips to speed up WordPress performance. All you need to modify .htaccess file on your server and add some plugins.

The Ultimate Guide to Harden WordPress Security

Learn how to improve WordPress security. Here are some basic security concepts that will help you to harden WordPress security.

How to Setup CloudFlare Free SSL for WordPress Blog

Google has announced that they will count HTTPS as a ranking factor which means if you using HTTPS you will get a higher position...





Get almost 100% PageSpeed on Newspaper theme

The newspaper theme is the most popular premium theme for a self-hosted WordPress blog. The theme is developed by team tagDiv. You...

How to Remove jQuery Migrate in WordPress?

jQuery Migrate greatly simplifies the process of moving older jQuery code to a higher jQuery version by identifying deprecated features. It then restores deprecated...

How to Delete Multiple Images in WordPress Media Gallery

Hey, guys today one of my friends asked me a question, How can I delete Multiple Images in WordPress? I replied, "It's very simple." Yeah,...

WP Super Cache Plugin: Best Settings & Configuration Guide

A cache plugin serves static contents to the visitor which improves page load speed. There are so many cache plugins available in the...

How to Auto-Improve Server Response Time

Obtaining good user experience also includes fast page speed, less server response time and much more. People have different expectations of response times. For...

How To Target Country-Specific for Website Traffic

Website traffic is an essential thing to get good rank for your website. Increasing traffic amount optimizes visitor’s amount and increase your visibility. But,...