Guides & Tutorials

hosting image

How to ban any IP Address in cPanel via .htaccess?

If you feel that your website is not secure or you want to lock an IP Address. All you need to follow these steps to ban any IP address in cpanel.

  • First you have to find the “Files” area and click the “File Manager” icon as shown in the image below.

ban any IP Address in cpanel

  • Click the “Settings” button it will show you a dialog box.
  • In Dialog box, you need to mark(select) the checkbox “Show Hidden files(dot files) “ and press the “save” button.

ban any IP Address in cpanel

  • After the Dialog box is closed, you need to find the File Directory named “.htaccess”
  • Now you need to enter these commands to your .htaccess file.

order allow, deny

deny from IP-ADDRESS

allow from all

  • Remove old IP Address and enter new IP Address for which you want to banned.
  • Thanks for reading.

If you want delete FTP account then click the link delete FTP Acount. For server solution or web hosting visit cpanel.com.