How to Block Bad Bots From Your WordPress Website

You may have told by your web hosting or the security plugin you use that many fake users are trying to break into your website. They maybe automotive bots or humans, you can block bad bots from your WordPress website.

As you all know that website security is something you should never take lightly. Many websites get hacked every year because of the poor security.

You can follow the WordPress security guide.

If you’re good with monitoring your website then it can be easily tracked the IP addresses of the users who tried to login to your website.

For the login page, it’s also called the brute force attack. But bots can drop the malicious code in the comments too.

So you have to block bad bots from your WordPress website.

Use the .htaccess File To Secure Your Website

It’s no new thing to know about the use of the .htaccess file. You can add multiple layers of security using this file.

You can protect your admin folder, enable browser caching and what not.

I am sure, you know how to edit the .htaccess file. It can be done by accessing the cPanel of your web hosting account.

Go to cPanel>>File manager>>public_html>>.htaccess file. You can search this file which can be found easily.

In this file, you have to block the users from their IP addresses. Let me show you the code.

#Block IP Addresses.<Limit GET POST>

order allow,deny

deny from user1_IP

deny from user2_IP

allow from all


NOTE: You have to replace the user1_IP and user2_IP addresses with the original IP addresses you want to block.