Every website owner knows how difficult it is to handle a website and keep it steady all the time. Just like that, keeping your website safe and secure from the hackers and spammers are equally important as well. When it comes to the security of your website, blocking an IP address is a good method to avoid spams and hacking attacks. Let’s say, to block IP addresses in WordPress is a way to enhance the security of your website. However, you need to be careful on which IP addresses you need to block.
IP actually stands for Internet Protocol and IP addresses are basically 4 sets of numbers from 0-255 that are separated by dots. Each and every device that is connected to the internet has a unique IP address assigned to them by their internet service provider. All the visitors on your website have an IP address which is stored in your website’s access log files. This means that all the websites that you visit, stores your IP address as well.
Blocking IP addresses in WordPress is used to avoid the spammy comments, unwanted visitors, hacking attempts, spammy emails, and more.
Having said that let’s see how you can block IP addresses in WordPress without any difficulty.
Block IP Addresses in WordPress
First of all, you have to find the IP address that you don’t want to see on your website and block them. For that, you can see their IP address by visiting the comments page.
You can block IP addresses in WordPress from the admin area. You need to visit Settings > Discussion page and scroll down to “Comment Blacklist” text box.
Copy and paste the IP address that you wish to block and then click on the Save Changes button. However, this doesn’t stop the blocked users from visiting your website. They will see an error message when they try to submit a comment on your website.
I personally think that if you’re trying not to get comments from some specific users, then this is the best way to keep them updated with your contents but not hear back from them.
If you want to completely block users from viewing or accessing your website, then the following method is for you.
Block IP Addresses in WordPress using cPanel
This method will completely block users from visiting your website. It is useful to protect your WordPress website from hacking attempts and denial of service attacks (DDOS).
First, log in to the cPanel of your WordPress hosting account. Scroll down to security sections and click on “IP Blocker”.
You will now reach on the IP Address Deny Manager tool. Now, all you have to do is add the IP addresses that you want to block. After you’re done adding the IP addresses, click on Add button.
That is it. You can use both of the above-mentioned methods to block IP addresses in WordPress. You can unblock the blocked IP addresses whenever you want to.
I hope this article helped you block IP addresses in WordPress and avoid spammy emails, comments, hacking attacks, and unwanted users. If you know any other method of blocking IP addresses in WordPress, please feel free to share with us through the comments section below.