How to block IP using .htaccess file

You may block access to your website from specific IP addresses using .htaccess file.
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.

You can download list of each country IPs from following link:
https://www.countryipblocks.net/country_selection.php
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Register my private nameservers?

Setting up private nameservers is fairly simple, however it all depends on where you registered...

Creating an account in WHM

A successful login at WHM will redirect you to the default screen of WHM and it shows different...

Can i have Private Nameservers for WHM/Cpanel/Hosted Domains?

Certainly, you can have. Even we setup private nameservers for the subresellers created by master...

My Joomla has been hacked!

A Joomla is usually compromised when it or its components / modules are outdated. Another very...

My site does not appear in the browser

1. You have made the DNS changes (to be exact you need to change DNS servers of your domain to...

Powered by WHMCompleteSolution