How to Stop WordPress Spam Comments from .htaccess

The biggest problem with WordPress bloggers is Spam Comments because it affects the Search Rank of the site and the site Search Ranking goes down. You can remove Spam Comments with the help of plugins like Access. Here’s how to combat Spam Comments on a WordPress blog with .htaccess, which is the easiest.

 

Stop Spam Comments using htaccess WordPress

 

How to Stop WordPress Spam Comments using .htaccess

I have already written an article in which you 10 Ways to Stop Spam Comments on a WordPress Blog, but if you want to block comments in a simple and easy way then you can block it in WP-Content file with the help of .htaccess function. This is the best way. Avoid Spam Comments.

 

 

If you have a problem with Spam Comments on your WordPress blog, you can edit and close this .htaccess. For this you will need the IP Address of the commenter which you can easily find in the comments section.

 

What is .htaccess file?

  1. You will find the .htaccess file in your hosting panel so follow this
  2. Go to your cPanel and log in
  3. Under the file section, click on file manager
  4. Select the document foot for option and choose your domain from the dropdown
  5. Now see the entire folder list and right-click on the .htaccess file and select edit

 

If your WP-Content does not have .htaccess enabled, you can make .htaccess enabled by clicking on the new enable in the top menu, after selecting the domain

 

Warning: I would highly recommend that you make a backup of yourself. htaccess file before you put it to standby, as a small mis-editing of this file will cause your site to stop working.

 

How to avoid Spam Comments with .htaccess file.

After backing up the .htaccess file, add this code and save the function.

 

<Limit GET POST>

order allow,deny

deny from 12.223.111.140

allow from all

</Limit>

 

If you want to block more than one IP Address, you can add another IP Address like the same deny form xxx xxx xxx xx.

 

<Limit GET POST>

order allow,deny

deny from xx.xxxx.xxx.xxx

deny from xx.xxxx.xxxx.xxx

deny from xx.xxx.xxx.xxx

allow from all

</Limit>

 

You can easily find the IP Address of those who make unnecessary comments in the WordPress Dashboard >> Comments >> Spam Page, so you have no problem following this truck, you can easily solve the problem of unnecessary comments.

 

I know you have got good information from this post and your WordPress problems have been solved. Dear friend and visitors if you like this article so please share this article with your friends and family thanks for visiting.

 

 

 

 

 

Spread the love

Leave a Comment