One of the best thing about cPanel hosting is; you can do various tasks from the GUI (Graphical user interface). The other day I had to ban certain I.P to access my website, and one of the easiest way to get it done is using I.P. deny manager from cPanel. You can also use .htaccess method to deny I.P. access to your site, but using cPanel is easy and fast.
To my surprise, I got an email from Siteground team saying:
“We would like to inform you that your account “xxxxxx” has used 90% the monthly allowed usage of 600000 CPU seconds per account. Please note that once you hit 100% of the allowed monthly CPU seconds, your web service will be limited to the calendar month. The web service limit means you might be having problems accessing your website.”
This was something new to me, as I’m hosting only 5 WordPress sites which are getting reasonably low amount of traffic. At the top of it, I’m using Cloudflare to prevent bad bots from accessing my sites. I reached out to Siteground support team, and they told me the issue is normal and suggested me to block certain bots I.P from accessing my site. I will write a detailed article on Siteground CPU resource usage later, for now let’s learn how to block I.P. address on Siteground hosting.
How to Block I.P on Siteground cPanel hosting:
If you know which I.P you want to block, you can skip the below step or read this interesting part, as it would be helpful for you on any cPanel hosting you are using. In my case, Siteground customer support told me to which I.P I should block. In your case, you can click on Visitors stats > Awstats in your cPanel & click on the site name to see the Awstats report for the site. In the report, under Hosts you can see specific I.P., which is consuming maximum resources from your site.
As you can see from above image, one particular I.P. is consuming about hell lot of bandwidth. A good idea is to do a who.is search for the I.P. to see the host name.
Note: Ensure that you don’t block good bots search as Google search bots. (Perform action when you know what you are doing).
So once you have a list of I.P, which you would like to block, here is what you need to do.
Go to cPanel of your hosting account and click on I.P. Deny Manager under security.
On the next page, you can add the I.P. address you want to block. You can also add a range of I.P or Implied range, by using the convention as shown in the below image:
In my case when I clicked on Add after adding then I.P, I got an error saying:
“Error: while opening /home/xxxx/public_html/sgusers.com/.htaccess Error: while opening /home/xxxx/public_html/sgusers.com/.htaccess”
Somehow, this was a false alarm, as when I refreshed the page that I.P was added to the I.P block list. So, if you encounter such error, you know what to do.
You can always block I.P. access to your website using .htaccess, but this is a simple & straightforward method. I also recommend you to start using Cloudflare under low-security settings, as it will prevent bad bots to access your site.
Do let me know if you have any query using I.P. deny manager on cPanel hosting? Feel free to ask via comments. Found this tutorial informative? Consider sharing it with others on Facebook and Google Plus.
Latest posts by Harsh Agrawal (see all)
- SiteGround Coupon – Get Maximum Discount on Hosting - August 14, 2020
- Which SiteGround Shared Hosting Plan Is Best For You - August 13, 2020
- How To Enable Siteground SuperCacher For WordPress Site - August 12, 2020