IP Access Restriction in cPanel. Restricting access based on IP address is an efficient method for protecting your website against brute-force attacks, unauthorized access, or resource abuse.
Through cPanel, this action can be implemented quickly without advanced technical knowledge.
IP Access Restriction
Accessing the IP Blocker option in cPanel
To block access from an IP or a range of IPs, follow these steps:
- Log into cPanel
- Navigate to the Security section
- Click on IP Blocker
Adding an IP to the block list
On the “IP Blocker” page, you have the ability to enter an IP address, domain, or IP range. Valid examples include:
192.168.0.1– blocks a single IP192.168.0.1-192.168.0.50– blocks an IP range192.168.0.0/24– blocks an IP class (CIDR)example.com– blocks a domain (will be converted to IP)
After entering the desired value, press the Add button.
cPanel will automatically add the rule to the .htaccess file in public_html.
Checking blocked IPs
Below the add form, you will find a list of all IPs already blocked. From here you can:
- Check restricted IPs
- Remove an IP from the list by pressing Delete
Blocking IPs from the .htaccess file (alternative method)
For advanced control, you can manually edit the .htaccess file in public_html and add the following lines:
Order Allow,Deny
Allow from all
Deny from 192.168.0.1This method is recommended only if you have basic knowledge about Apache web server configuration.
When is IP blocking useful?
- When you notice suspicious traffic from a certain region
- When you receive brute-force attacks on the login panel
- When you want to temporarily restrict public access to certain sections of the website
- When using test subdomains that should only be accessed from the internal network
Limitations and recommendations
- Avoid blocking dynamic IPs – they may affect legitimate users
- Use external tools like IP Lookup to identify the source of suspicious IPs
- For more advanced protection, consider implementing an external firewall or using Cloudflare
IP Access Restriction in cPanel is an essential functionality for securing your website.
It gives you direct control over users who can access your online content, without requiring complicated technical interventions.
Use this function with caution and constantly monitor traffic to detect unwanted behaviors.

Comments (0)