Do you want to block specific IP addresses from accessing your WordPress site?
Blocking IP addresses is used as a solution to block spam and hacking attacks on your website.
In this article, we will show you how to block IP addresses in WordPress, and we will also show you how to find out which IP addresses needs to be blocked.
What is an IP Address?
If internet was a physical world, then think of IP addresses as country, street, and house numbers.
They are basically 4 sets of numbers from 0-255 separated by dots and look like this: 172.16.254.1
Each computer connected to the internet has an IP address assigned to them by their internet service provider.
All visitors to your website have an IP address which is stored in your website’s access log files.
This means that all websites that you visit also stores your IP address.
You can hide this information by using a VPN service.
This allows you to hide your IP address and other personal information.
Why & When You Need to Block IP Addresses?
Blocking an IP address from accessing your website is an effective way to deal with unwanted visitors, comment spam, email spam, hacking attempts, and DDOS (denial of service) attacks.
The most common sign that your website is under a DDOS attack is that your website will frequently become inaccessible or your pages will start taking forever to load.
The other attacks are more obvious such as when you start getting spam comments or a lot of spam emails from your contact form.
We have a list of ways to fight spam comments, but the last solution is to block IP addresses.