How to Block an IP Address From Visiting my Website
Online security has become more important than ever in today's digital age. With the rise of cyber attacks and data breaches, protecting your website from unwanted visitors is crucial. Fortunately, several tools can help you maintain the security of your website, including the IP Deny Manager feature in cPanel.
IP Deny Manager is a handy feature that helps you protect your website from unwanted visitors. It allows you to block a range of IP addresses to prevent them from accessing your site. You can also enter a fully qualified domain name, and the IP Deny Manager will attempt to resolve it to an IP address for you. This feature is particularly beneficial when experiencing a high traffic volume or receiving unwanted traffic from specific IP addresses. Blocking access to these visitors can improve your website's security and prevent potential attacks. With IP Deny Manager, you can easily manage and maintain a list of IP addresses you want to block and protect your website from malicious activity.
- Reasons to block an IP address from visiting your website
- Finding out a Visitor’s IP Address
- IP Deny Manager
- How to Deny All
- Summary
Reasons to block an IP address from visiting your website
Preventing an IP address from accessing your website is an effective measure against unwanted visitors, spammy comments, junk email, hacking attempts, and DDOS (denial of service) attacks. This practice helps keep your website safe and running smoothly, making sure real visitors can use it without issues caused by these harmful actions.
Finding out a Visitor’s IP Address
Using Visitors tools, one can find more information on their visitors. This tool will show visitors' Host information; it could be an IP address or a domain name. This function displays up to 1,000 of the most recent entries in the domain’s web server log.
To find out a visitor's IP address using cPanel Visitors, follow these steps:
- Log in to your Bluehost Account Manager.
- Click the Hosting tab from the side navigation menu to the left.
- Under Quick Links in Server Information, click on CPANEL.
- Scroll to the Metrics section and click Visitors.
- You will see a list of your Domain. To find out the IP address of a specific visitor, click on the magnifying glass icon next to it.
- A detailed window will appear with default information displayed in the interface:
- IP — This refers to the visitors' IP address.
- URL — This is the specific URL the visitor accessed on your website.
- Time — This is when the visitor accesses your website.
- Size (bytes) — This refers to the server's data for this resource to the visitor.
- Referring URL — This is the web address from which the visitor navigated to the resource.
- User Agent — This is the visitor's browser to access your website.
Click the gear icon to display more data and select the desired options.
- Status — This HTTP code indicates whether the requested resource was loaded successfully or if an error occurred.
- Method — This refers to the type of request-response exchanged between the client and server, such as GET or POST.
- Protocol — This is the version of HTTP that the server uses to serve the requested resource to the visitor, for example, 1.1.
That's it! You can now use the IP Blocker to block an IP Address from accessing your site if necessary.
IP Deny Manager
The IP Deny Manager allows website owners to block and unblock a list of IP addresses, IP ranges, and domains that cannot access the website. When a request is made from a denied IP address, the server will reject the request and prevent access to the website or specific areas of the website.
How to Block an IP Address or Domain
To block an IP address in the cPanel IP Blocker, follow these steps:
- Log in to your Bluehost Account Manager.
- Click the Hosting tab from the side navigation menu to the left.
- Under Quick Links in Server Information, click on CPANEL.
- Scroll down, and under Security, click on the IP Blocker icon.
- On the Add an IP or Range, enter the IP address or domain name to block.
- Click the Add button.
How to Unblock the IP Address or Domain
To unblock an IP address in the cPanel IP Blocker, follow these steps:
- Log in to your Bluehost Account Manager.
- Click the Hosting tab from the side navigation menu to the left.
- Scroll down to click the CPANEL button under Quick Links.
- Under Security, click on the IP Blocker icon.
- Scroll down and locate the IP address or domain name you want to unblock.
- Click the Delete option under Actions to remove it.
- Confirm the removal of the IP address by clicking the Remove IP button.
How to Deny All
You can also set an option for deny from all, which will deny everyone.
This must be done by coding your .htaccess file as follows:
deny from all
allow from 70.24.291.52
allow from 216.130.49.223 #My IP address
See the article on How to Edit Your .htaccess File for generic instructions for all .htaccess changes.
Warning: However, it's important to be careful when using the "deny from all" option in the IP Deny Manager. While this option can effectively block unwanted visitors, it can also accidentally block legitimate traffic, including your IP address. To avoid this issue, it's recommended that you use the "deny from" option instead and specify the IP addresses or domains that you want to block.
Be sure to allow access to your IP address. Otherwise, you will be blocked as well. You can find out your current IP address by visiting http://www.Bluehost.com/ip. If you accidentally block yourself, please get in touch with BRAND via live chat or telephone. You must confirm your identity ("verify your account") before we can unblock your IP.
Summary
The IP Deny Manager feature in cPanel allows you to easily block a range of IP addresses or domains that you want to prevent from accessing your site. This feature is particularly useful if you have identified a specific IP address or domain causing problems, such as spam or hacking attempts. By blocking these addresses, you can prevent them from accessing your site and potentially compromising your security.
In addition to the IP Deny Manager feature, cPanel also includes a Visitors tool that allows you to identify and track visitors to your website. With this tool, you can find a visitor's IP address or domain and use it to block them from accessing your website if necessary. This can be especially useful if you notice suspicious activity or receive reports of unauthorized access to your site.
If you need further assistance, feel free to contact us via Chat or Phone:
- Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
- Phone Support -
- US: 888-401-4678
- International: +1 801-765-9400
You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.