Knowledgebase
Portal Home > Knowledgebase > Security > How to ban any IP Address via .htaccess?
How to ban any IP Address via .htaccess?
If someone is trying to hack your website or you want to block their IP Address, you can add this line to your .htaccess file.
order allow,deny
deny from IP-ADDRESS
allow from all
Replace "IP-ADDRESS" with the IP Address you want to block.
Also Read
How to restrict directory access by IP address?
3417
How to Enable or Disable Mod Security in cPanel?
3342
How to Enable the Two-Factor Authentication on Your cPanel Account?
3496
How to blacklist an IP Address to deny it access to your website?
3171
How to protect a folder with username and password in cPanel?
3576