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.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Did you find this article helpful?


n/a Points
2015-08-05 2:29 am

Hi, I am running a PrestaShop store, but basically I am a writer so lacks some technical knowledge. I am not seeing this option on FTP, I am thinking about using .htaccess file. Firstly I was looking to use a this block IP module . Method of blocking is really simple through module but if it can be done with .htaccess, I will like to try. Please let me know that from where I can find this .htaccess file, it will be in FTP or theme files?

14,932 Points
2015-08-05 7:58 pm
Hello Lusi,

The .htaccess file can be found by using the File Manager, in cPanel. It's a HIDDEN file. You would need to set the File manager to see the files. It is typically located directly under the folder where your website files are stored. The default root directory for your website is the public_html. The .htaccess file is a text file that can be easily edited. The option available in cPanel (IP Deny Manager) lets you block IP addresses without having to edit the file. The .htaccess file can be found using FTP, but it's not located in the folder labeled "public_ftp". FTP is simply a tool that can list all of the files within your hosting account. cPanel File Manager does that as well. I hope this helps to answer your question, please let us know if you require any further assistance.

Arnel C.

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.