Blocking IP Addresses
Block specific IPs from accessing your website to prevent abuse or unwanted traffic.
In cPanel (IP Blocker)
- Go to IP Blocker in cPanel
- Enter the IP address or range
- Click Add
IP Range Formats
- Single IP:
192.168.1.100 - Range:
192.168.1.100-192.168.1.200 - CIDR:
192.168.1.0/24
Via .htaccess
apache
# Block single IP
Require not ip 192.168.1.100
# Block IP range
Require not ip 192.168.1.0/24In Cloudflare
If using Cloudflare:
- Go to Security → WAF
- Create a custom rule to block the IP
- This blocks before traffic reaches your server
Finding Abusive IPs
- Check access logs in cPanel → Metrics → Raw Access
- Look for IPs making thousands of requests
Tips
- Block by range if attacks come from nearby IPs
- Use Cloudflare or a firewall for large-scale blocking
- Consider rate limiting instead of permanent blocks
- Unblock IPs periodically — they may be reassigned to legitimate users