How Do I Deny an IP Address Access?
Do you want to stop someone from visiting your website? Below are the steps in blocking a specific IP Address.
- You are logged into your Customer Portal. You can also log in after clicking the link.
- The hosting package you are attempting to access is either a Shared or Cloud.
How to Find Out a Visitor’s IP Address
- Log into your cPanel.
- Click the Visitors button in the Metrics section.
- Select the domain name that you want to view its recent visitor by clicking on the magnifying lens icon.
- This will redirect you to a page where you can see the IP address of your site visitors.
How to Block a Specific IP Address
Here are the steps outlined in the video guide above.
- Log into cPanel.
- Click on IP Blocker in the Security section.
- In the IP Blocker section, add the site visitor’s IP address that you wish to deny access to your site on the IP address field.
- Click the Add button. You will then be redirected to a succesful confirmation page.
How to Unblock the IP address
- Log into cPanel
- Click on IP Blocker in the Security section.
- Under Currently-Blocked IP Addresses: select the IP address you wish to unblock.
- Click the Delete icon.
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:
See the article on How to Edit Your .htaccess File for generic instructions that apply to all .htaccess changes.
Note: It is possible to block access to yourself accidentally by using this method.
Be sure to allow access via your IP otherwise you will be blocked as well. You can find out your current IP address by visiting the What is your IP? page. If you accidentally block yourself, please contact HostGator via phone or Live Chat. You will need to confirm your identity ("verify your account") before we can unblock your IP.