The other day, my wife Katie got over 800 SPAM email comments within the span of 6 hours. I noticed that they all came from the exact same IP address. I blocked that IP address and then realized that I should show you all how I did it.
First things first, this tutorial is for WordPress users who have cPanel.
Second, why would you want to block them?
Well, every time someone visits your site, it uses a little bit of memory from your webhost. If this happens 800 extra times in a span of a few hours, that can add up to a significant amount of memory (depending on your hosting plan) and could even lead to your site slowing down or shutting down. Not to mention the annoying 800 spam comments that they leave behind.
Note: You can also use this method to stop trolls from accessing your site. If you have someone harassing you leaving rude comments, just block them!
Ok, so how do you block them?
First, let me show you how to find their IP address.
Get to the comments section in your WordPress dashboard and look for this:
You can also, in cPanel, go to “latest visitors” under the Logs section and see every IP that is accessing your site (comment left or not).
Ok, now that you have the IP, what’s next?
Go to your cPanel and it will look like this:
Ok now don’t freak out here. But also don’t touch ANYTHING that you are not familiar with. Find something called the “IP Deny Manager” under the security section and click it one time.
From here, you can simply add the IP addresses that you want blocked as shown below:
Note: I recommend only blocking SINGLE IP addresses, as opposed to a range. Blocking a range can deny many people access to your site, some of whom may not be spammers at all.
Blocking IP addresses is not permanent either. You can unblock them at anytime.
Annnnnnnd that’s it! Easy peasy! Another reason why having a WordPress blog is awesome! Blocking trolls!
Cool! I’ve never thought to look at IP addresses for all those spam comments… I definitely don’t get 800 in the span of a few hours, but I do get quite a few! I’ll have to check the IP addresses next time they start building up. Thanks! 🙂
I didn’t think of it either… then 800 comments got me looking! 😀
Awesome tip! Thanks! This is going to come in very handy! I’ve never seen so many comments about Louis Vuitton bags in my life!
Haha! Yep, and something tells me they’re not even real LVs anyway!
Great tip! Much easier than deleting hundreds of random emails everyday!