Is it possible to block a country from visiting my site?


Recommended Posts

Posted

One of my sites is getting hammered by visits from China. But we have nothing to offer anyone in China. It's chewing up my bandwidth like crazy. Actually the site itself hasn't been updated in a while.

 

Is there a nice solution to this issue where I could block these visits saving lots of bandwidth?

 

Thanks!

Posted
Yes, it's a message board using IPB. So if the php option is better I could use it. 

 

Thanks. 

 

I'm not sure if IPB has this built-in however you can utilize GEOIP stuff for that. Here is a little thread on the IPB forums which should work as you want (although you'll need to ensure you have the proper GEOIP database downloaded / working).

 

There are a few methods in that thread including a .htaccess one and several PHP snippets you can toss in your index.php file.

 

http://community.invisionpower.com/topic/337167-geoip/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...