Free Online Tools

.htaccess Ban Generator

Restrict by IP address or Domain

You can use .htaccess to ban or allow access to your web site by IP address or Domain.

Enter IPs, followed by line break. List IP addresses. List one IP address per line.

Your IP List:

Deny browser access to generated .htaccess file. This is only needed if:
Your .htaccess file is in a web accessible directory.
Your server isn't configured to disable browser access to .htaccess. (this is not common)
Redirect. Send the visitor to this url if they are denied access. You can change the URL with other website:)


Valid IP Addresses

IP addresses are in the form and each of these four numbers is from 0-255
You can enter partial addresses to restrict larger blocks of addresses: -Blocks one specific IP address
1.2.3. -Blocks IP address in the range to (ie..
1.2. -Blocks IP address in the range
1.2 -Blocks IP address in the range
or just domain name
Be careful when blocking blocks of IPs as you might be blocking legitimate traffic!

ETI 2023
6 online