Databloc - cpanel web hosting
Call us toll free at 1-888-210-1714

The leading provider of top quality cpanel web hosting services.

Databloc Homepage   Shared Web Hosting Reseller Hosting Domain Registration SSL Certificates

Support

Sometimes it is necessary to block an IP Address from your web site. In this exclusive Databloc tutorial we will teach you how to do just that.

Creating The Access Control File

Databloc uses the Apache web server and therefore you need to create an .htaccess (yes, the dot should be there) file in the root web directory (/public_html). You may wonder what is an .htaccess, well it is simply a control file which is used by Apache. It allows you to control aspects of the server such as blocking certain IP Addresses. For more information on creating an .htaccess file see our Introduction To An ".htaccess" File article.

Using a text editor like Notepad simply create a file called .htaccess and add the following into it:

order allow,deny
deny from 123.123.123.123
allow from all

Please note that the IP Address given in the syntax above should be changed to the IP Address that you wish to block.

Uploading The Access Control File

Now, using an FTP client you need to upload the .htaccess file into your root web directory (/public_html). The file must be transferred in ASCII (plain text) mode.

Web Hosting with cPanelPHP4, PHP5 and PHP6MySQLCGI, PerlEnhanced Frontpage ExtensionsRuby On Rails (ROR)Fantastico Enabled
Shared Web Hosting | Reseller Hosting | Domain Registration | SSL Certificates
Customer Support | Terms of Service | Acceptable Use Policy | About Us | Sitemap