How do I block visitors from my site?

Create a .htaccess file and 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 (allow from .friendsite.com works, etc.)

  • 0 användare blev hjälpta av detta svar
Hjälpte svaret dig?

Relaterade artiklar

Limiting what search engines can index using /robots.txt

Various search engines such as Google have what are called "spiders" or "robots" continually...

Why do I get a red (x) where my images are supposed to be?

Either the image was not uploaded and therefore does not exist on the server or your path to the...

I have registered a domain name but I dont know how to create a website. What should I do?

A domain name is just a word if it has not been connected to a website containing actual content...

Password Protection

Password Protection lets you restrict access to certain areas of your Web site. You can designate...