Support - Knowledge base

Giving you the answers you need

Why not try our knowledge base for instant help and advice to enhance your online experience with Register365? From within the knowledge base you can browse our frequently asked questions and find the right answers to help solve your queries.

Home  >  Hosting  >  Common Hosting questions  >  View Article

Blocking users by IP Address

3*3*3*3*3*

Article

In your htaccess file, add the following code--changing the IPs to suit your needs--each command on one line each:

order allow,deny  
deny from 123.45.6.7  
deny from 012.34.5.  
allow from all

You can deny access based upon IP address or an IP block. The above blocks access to the site from 123.45.6.7, and from any

sub domain under the IP block 012.34.5. (012.34.5.1, 012.34.5.2, 012.34.5.3, etc.)

You can also set an option for deny from all, which would of course deny everyone. You can also allow or deny by domain name rather than IP address.

Rate This Article

How useful was this article?

Not useful A little useful Useful Very useful Everything I needed