.htaccess maker

.htaccess generator maker easier

Htaccess Block or deny visitors by IP address

Visitor blocking features are available through htaccess available in the Apache web server, and it allows you to approve access or denial to certain visitors and you can simply give access to certain components of the website only. In order to deny visitors by IP address or referrer, simply create .htaccess and follow the instructions given. In most cases you will see a text in the following format.

Order allow, deny
Deny from 255.0.0.0
Deny from 123.45.6
Allow from all

The above illustration simply orders the Apache web server to block a visitor with IP address 255.0.0.0, therefore each IPs match the first three sets of numbers in 123.45.6.255’ will be automatically blocked through the htaccess in the Apache web server. You can further add any number to the “deny from…..” and all blocked visitors will receive the message- “403 forbidden”, on their computer screens.

Your .htaccess File

Download Copy

You can create the .htaccess file using a good text editor like TextPad, UltraEdit and Microsoft WordPad. You cannot use Microsoft NotePad. An .htaccess file can contain a single or multiple lines depending upon the functions you want to include in it. You will need to use an FTP (File Transfer Protocol) program to upload the file. Also you must to upload the file in “ASCII” mode. Some FTP programs use “BINARY” as the default to upload files. If that’s the case you must change it to “ASCII”. Upload the file to the directory you want it to reside in. when you look at the files in your website’s directory you might not see it as your web server’s software is probably hiding it.

Block or Allow visitors by IP

Comma separated list

Comma separated list

Copyright © 2021 · htaccessmaker.com · Log in