Sometimes, you may need to block traffic to your website. This can be done in your cPanel by blocking the IP address. You can block just one IP, or a range of IPs from accessing your site.
Why would I block an IP Address?
Most website owners never have to worry about blocking an IP address. However, there are a few instances where you may need to:
- An IP address is trying to hack your site. If in your logs you see one IP trying to access your files via FTP, you can block it. This will prevent whoever was using that IP from attempting to hack your site.
- An IP address is visiting your website suspiciously. In rare situations, you may see an IP from a different country visiting your site. This is pretty normal, but if the IP's connecting hundreds of times a day, it may be suspicious. You may choose in that situation to block the IP address.
- You don't want someone accessing your site. This can be for a variety of reasons. But if there's one person you don't want visiting your site, you can add their IP to the block list.
How do I Block an IP Address?
First, log into your cPanel. Navigate to the IP Deny Manager:
This is where you will enter the IP address. Put the full IP address in the blank field and click Add:
The next screen will confirm the IP address has been added:
It is that simple! You can also add a range of IPs. If you enter in a range of IPs:
Then on the "Current IP addresses being blocked" section it will list every IP not allowed:
You can remove an IP from the list by clicking the red X in the "Remove" column.