SmartVPS - the complete multi-account hosting solution! Each individual account comes with free backups, addon domains, PHP-FPM with OPcache and server-side caching for lightning-fast sites. And all this at a great price!
75% OFF ALL NEW PLANS + 100-DAY MONEY-BACK GUARANTEE
75% OFF ALL NEW PLANS

You can prevent given IP addresses, networks, or country IP ranges from being able to open your website in a web browser.

To enable the protection, you need to browse to the directory you want to protect at the Web access protection section. You should note that the protection works recursively and will affect all lower-level directories. To access the interface for blocking IP addresses/networks, you need to click the Add/Remove button under Block by IP.

Block by IP address



Blocking a single IP addresss

To block a given IP address, you need to enter it at the interface that follows and click the Add button. The IP address will appear in the Blocked IP addresses section. To remove an IP address from the list, you need to either use the Delete button next to it, or check the box in front of the addresses you want to unblock, and use the Delete selected button.

Blocking a network range

If you want to disallow the web access for a whole network, you can use wildcards. For example, if you want to block all IP addresses starting with 123.234, you need to specify:

123.234.*.*

This way all IP addresses from this network block (such as 123.234.34.45 for example) will not be able to open your website.

Country level IP block

You can block all IP addresses belonging to a specific country from accessing your website. You just need to choose the country, the IP ranges of which you want to block, and click on the Add button below the section. The country will appear in the Blocked countries list. You can add more countries to the list by following the same procedure. To remove a country from the list, you can either use the Delete button next to it in the list, or check several countries from the list, and use the Delete selected button.

The country level IP block uses the GeoIP database of Maxmind through the mod_maxminddb Apache module to determine which addresses belong to a specific country.