StarDomain

Blocking IP Addresses

Blocking IP Addresses

Block specific IPs from accessing your website to prevent abuse or unwanted traffic.

In cPanel (IP Blocker)

  1. Go to IP Blocker in cPanel
  2. Enter the IP address or range
  3. 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/24

In Cloudflare

If using Cloudflare:

  1. Go to SecurityWAF
  2. Create a custom rule to block the IP
  3. This blocks before traffic reaches your server

Finding Abusive IPs

  • Check access logs in cPanel → MetricsRaw 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