Indian company. Since 2018.
Security

Block an IP Address with .htaccess

15,917 genuine article views Security

Tip: if you cannot see the .htaccess file in cPanel File Manager, enable Show Hidden Files (dotfiles) in File Manager settings.

To block a specific IP address from accessing your website, add the following rules to the site's .htaccess file:

order allow,deny
deny from IP-ADDRESS
allow from all

Replace IP-ADDRESS with the address you want to block, then save the file. These directives use Apache 2.2 syntax; on servers using Apache 2.4, use:

Require all granted
Require not ip IP-ADDRESS