Knowledgebase
Portal Home > Knowledgebase > Technical > How do I block an IP address from accessing my website?
How do I block an IP address from accessing my website?
You can use the built-in cPanel IP manager tool to prevent users from accessing your website by blocking their IP address.
To find a visitors IP address, use the web statistics tools. We suggest you go to cPanel and click the Latest Visitors icon. Look for the Host information; it could be an IP or a domain name.
To block an IP address.
- Login to cPanel and click IP Deny Manager.
- Under "Add an IP to deny", enter the IP address or domain name you wish to block.
- Click the Add button.
To unblock an IP address.
- Login to cPanel and click IP Deny Manager.
- At the bottom, under "Current IP addresses being blocked", click Remove.
You can also modify your .htaccess file to prevent everyone from accessing your website and allowing only specific IPs.
Here is a sample .htaccess file
deny from all
allow from 69.123.123.123
allow from 209.123.123.123The above .htaccess file denies all requests except for ones from the IP address 69.123.123.123 and 209.123.123.123.
Add to Favourites
Print this Article
Powered by WHMCompleteSolution