How to block IP using .htaccess file?

1) You may block entrance to your website from particular IP addresses using .htaccess file.

2) You need to create this file in your public_html folder and add these example lines:

order allow,deny deny from 127.0.0.1 allow from all
These lines will block access for all users using 127.0.0.1 IP address. Just change the 127.0.0.1 to the IP you want to block.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

List of Common Available Ports On Cloud And VPS Servers

Inside our Cloud and VPS hosting services we want to make assured our clienteles have the skill...

Cloud Hosting VS. Shared Hosting

Shared hosting is the general hosting solutions. But using a shared hosting solution user has to...

How to Delete a cPanel Account From SSH

You can also terminate an account using SSH/command line if wanted using the following script....

HOW TO DELETE A CPANEL FROM WHM

Eliminating an existing cPanel account is a very fast and easy process, but be advised this move...

How to disable mod_security?

Mod_security can be easily disabled with the help of .htaccess. Here's the code that you will...