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 this rule to the site's .htaccess file:
Require all granted
Require not ip 203.0.113.10Replace 203.0.113.10 with the IP address you want to block. This syntax is for Apache 2.4. For Apache 2.2, use:
Order allow,deny
Deny from 203.0.113.10
Allow from all
