How to block IP using .htaccess file?

You can block an specific IP addresses to access your website using .htaccess file.

You need to create this file in your public_html folder and add this line by mentioning your own IP Address.

order allow,deny deny from 192.168.10.5 allow from all

These method will now block the incoming traffic from that IP address, you can type your required IP address instead of this example IP.
You can download the list of each country IPs from following link: https://www.countryipblocks.net/country_selection.php

  • ip block, htaccess
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How to create email account?

Video TutorialExplainationLog in to cpanel using your username and your cpanel password at...

How to change webmail password from cPanel?

Log in to cPanel using your username and your cPanel password at http://yourdomain.com/cpanel,...

How to add addon domain in cPanel?

Log in to cPanel using your username and your cPanel password at http://yourdomain.com/cpanel,...

How to change cPanel password?

Log in to cPanel using your username and your cPanel password at http://yourdomain.com/cpanel,...

How to change PHP version from cPanel ?

Video TutorialExplainationLog in to cPanel using your username and your cPanel password at...