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!

Blocking certain IP addresses from viewing your site

You can block IP addresses and ranges via your Control Panel's Protection section. You can find details at the Block by IP section.

To manually block a specific IP address from accessing your site, you should add the following line to your .htaccess file:

deny from is the IP address that you want to block. If the .htaccess file does not exist, you can simply create it.

For example, if you want to block, the line in your .htaccess file should be:

deny from

To prevent a range of IP addresses from a given network ( from reaching your site, you can do that in the following way:

deny from 123.234.

This way all addresses that start with 123.234 will be blocked.

You can add as many such rules as you want. You should note that if your .htaccess gets large, it may slow-down the loading of your site, as the file is being processed on each file request.