Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My personal website is currently getting a lot of spam comments at the moment, and most of them originate from Russia (I've used Google Analytics to identify the traffic, and a lot of the links link to Russian sites). As it's a pain to keep deleting this comments, I would like to ban people from there commenting or visiting the website. Is this possible?

Also, the website is using WordPress.

Many thanks!

share|improve this question
up vote 2 down vote accepted

Banning Russia is a very short-term solution: if/when your spammers realize they're blocked they'll just use different servers - it's fairly trivial to proxy requests... and you'll still be vulnerable to spam from the millions of other IP's you haven't blocked yet.

If you are not already doing so, check out Akismet and WP-reCAPTCHA - the combination of spam filtering and a CAPTCHA challenge should slow spam down to a trickle.

share|improve this answer
I have made these changes yesterday, so I'll see if it makes a difference. I actually had Akismet installed but I must have deactivated it during the development process. Thanks for the answer :) – mickburkejnr Jan 11 '11 at 9:14

The only practical way to do this would be to get a list of IP address blocks assigned to the country in question and then configure your site to ignore all traffic originating from those IP addresses.

There are a number of ways the block list could be implemented (in your firewall, in Apache, in your site software), but I have no idea what (if any) IP blocking solutions WordPress supports.

I've never used them, but Google turned up http://www.countryipblocks.net/ when I googled for a list of russian IP addresses...

share|improve this answer
I have to look to see if I can do this with WordPress. I'm sure there are some sort of IP blocking options available. I will let you know! – mickburkejnr Jan 11 '11 at 9:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.