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.
- Open WordPress Dashboard
- Under SETTINGS select Discussion
- Remove the tick from Allow link notifications from other blogs (pingbacks and trackbacks) on new articles
- Save changes
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.
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:
- Go to the WordPress dashboard
- Settings
- Discussion settings
- Other comment settings
- Save
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 </Limit>
You have to replace xxx.xxx.xxx.xxx with the IP address you wanna block. You can add multiple IP addresses in same code
- How to Tighten WordPress Blog Security using .htaccess
- 3 Correct Ways to Edit .htaccess File on your WordPress Blog
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:
- Jetpack Comments
- Disqus Comments
- Facebook Comments
So, this is how you can stop spam comments on your WordPress blog. All you need to modify .htaccess and functions.php file.