Archivio Domande

How can I block an IP from my website?

All shared, reseller, and semi-dedicated hosting plans allow you to block individual IPs or entire ranges of IPs from accessing your sites. There are two ways to complete this:

Blocking IPs through cPanel

  1. Login to your accounts cPanel at https://yourdomain.com/cpanel

  2. Use the provided search to look for the IP Blocker interface:



  3. Enter the IP address you wish to block in the provided form and then click Add:



  4. Your blocked IP will now display under the "Currently-Blocked IP Addresses" interface:




    Blocking IPs through .htaccess

    Alternatively you can modify your .htaccess file to block IPs. Your .htaccess file is usually found in the document root directory of your website:

    To block a single IP, add the following to the top of your .htaccess file. Replace 1.2.3.4 with the IP you wish to block:

    order allow,deny
    deny from 1.2.3.4
    allow from all

    To block multiple IPs, add the following to the top of your .htaccess file. Replace 1.2.3.4, 5.6.7.8, 9.10.11.12, etc. with the IPs you wish to block:

    order allow,deny
    deny from 1.2.3.4
    deny from 5.6.7.8
    deny from 9.10.11.12
    allow from all

    To block an entire range of IPs, add the following to the top of your .htaccess file. Replace 1.2 with the start of the full range you wish to block:

    order allow,deny
    deny from 1.2
    allow from all

    • 0 Utenti hanno trovato utile questa risposta
    Hai trovato utile questa risposta?

    Articoli Correlati

    Accessing SpamExperts and creating separate SpamExperts users

    All cloud web hosting, semi-dedicated, and reseller hosting services include enterprise level...

    Adding an IP or port to a whitelist

    Our default firewall rules allow most applications/software to run without issues on our shared,...

    Adding or Editing your DNS Zone Records (A,AAAA,CAA,CNAME,DMARC,M...

    Any website hosted through Hawk Host which is using Hawk Host's nameservers (nsX.hawkhost.com)...

    Can I password protect directories?

    Yes, do the following within cPanel: 1) Search for the "Password Protect...

    Configuring e-mail in Mac OSX (Mail.app)

    This guide assumes you've already setup your email accounts through cPanel. If you have not first...