- Log in to cPanel
- Go to FileManager
- At the top right, at Settings, click the button and select "Show Hidden Files (dotfiles)"
- Edit the .htaccess file
- Add deny from 123.123.123.123 (replace 123. 123. 123.123 with the desired IP address)
- Save the file
To block an IP class, just deny from 123.123.123 (replace 123. 123. 123 with the desired IP address)
WARNING: It is recommended that you keep the number of IP blocked to a minimum because a large number of IPs blocked through .htaccess will negatively affect the performance of your website.
