Steps to block particular IP address with .htaccess file

bhawanisingh

Administrator
Staff member
For that you have to follow below steps:
  • Login to cpanel.
  • Click on “File Manager” under “Files” section.
  • Now click on “public_html” directory and then click on “Setting” icon upper right corner.
  • Check the checkbox “Show hidden files” option and click on save.
  • Now you can view the .htaccess file, right click on it and click on “edit”.
  • You can add the below lines in your .htaccess file to block IP address.
Code:
Order Denny, Allow
Deny from 192.000.000.000
  • This will block the particular IP address and you can also add multiple IP address.
 
Top