Loading...

Knowledge Base

How Do I Deny an IP Address Access?

Do you want to block visitors from a specific IP address? cPanel's IP Blocker lets you deny access to your site from that address.

Keep in mind that IP blocking has limits. A person can change networks or use a VPN or proxy, and some IP addresses are shared by many users, so blocking one may affect others. IP blocking isn't a complete security measure.

This article discusses the following topics:

How to locate a visitor's IP address

  1. Log in to your cPanel.
  2. Look for the Metrics section, then click on Visitors.

    HostGator cPanel Metrics Section
     

  3. Locate the domain name to view its recent visitors, then click the magnifying lens icon.

    Cpanel site visitor's IP address view
     

  4. The next page will show you the IP addresses of your site visitors.

    cPanel view site visitors IP address
     

How to block a specific IP address

  1. Log in to cPanel.
  2. Click on IP Blocker in the Security section.

    HostGator cPanel IP Blocker
     

  3. In the IP Blocker section, add the site visitor's IP address that you wish to deny access to your site in the IP address field.

    HostGator Block an IP address section
     

  4. Click the Add button. You will be redirected to a successful confirmation page.

How to unblock an IP address

  1. Log in to cPanel.
  2. Click on IP Blocker in the Security section.

    HostGator cPanel IP blocker section
     

  3. Under Currently-Blocked IP Addresses: locate the IP address you wish to unblock.

    HostGator Cpanel Unblock IP Address
     

  4. Click the IP's 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. The following image shows an example:

.htaccess deny all IP
 

See the article on How to Edit Your .htaccess File for generic instructions that apply to all .htaccess changes.

Have another question? HostGator supports are here to help; please contact us via phone or chat.

Loading...