One of the biggest concern which you are going to face while running a website is getting spam from website forms. One of the most common way of spam is comment spam and when it comes to WordPress we have many method to control comment spam. One of the finest method is using Akismet WordPress plugin, you can get it easily from WordPress plugins. We can avoid spam comments on wordpress using .htaccess file.
Now a days each one of us wants to know that how spam comments can be avoided as much as possible.
If still you get your comment spam page,than there is one more way as you might look for few IP addresses are constantly sending comment spam. The best way to get rid of these spam is by deny their IP address using .htaccess file. Please keep a backup of your .htaccess file before updating it. You can find .Htaccess file at the root of your WordPress directory and you can also use SEO by yoast plugin and Edit files to update your .htaccess file or you can follow this below code which I have mentioned below to make changes in your .htaccess file to block specific IP address. Make sure you take a backup of your .htaccess file before making changes, as even a single wrong change will put your site down so please prefer to take a backup before doing any changes, so that it can be easily restore in case of any mis happening.
Here is the code that you need to enter in your .htaccess file, and upload it.
< Limit GET POST>
deny from 77.543.228.154
allow from all
You can always enter more IP addresses by adding one more line
deny from xxx.xxx.xxx.xxx
You can get the IP addresses of the spammer in your spam comment page, in your WordPress dashboard I find this way to be the best way to battle against the lots of spam from bots.
For more details please contact connect