homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

How do I block China traffic?
china traffic

10+ Year Member

Msg#: 3384561 posted 10:35 pm on Jul 2, 2007 (gmt 0)

How do I use javascript or html in my header pages to become invisible to China traffic?



10+ Year Member

Msg#: 3384561 posted 2:06 pm on Jul 3, 2007 (gmt 0)

There are probably neater ways to do it but you can block China IP-ranges in your .htaccess file. The problem is that you have to keep the list of blocked IP-ranges updated, and it might not be possible to block ALL traffic from China since that would be too many IP-ranges.

If it is SPAM you are concerned about try blocking the ranges the SPAM originates from.


5+ Year Member

Msg#: 3384561 posted 4:26 pm on Jul 7, 2007 (gmt 0)

.htaccess will do the trick right enough if you're on an Apache server. However, there's always more than one way to crack a nut.

If I wanted to see your content and my IP was blocked, the quick fix would be to look at your pages in the Google cache. You could, of course, try and get around that one by instructing Google not to cache your site by adding this tag to you pages:


I could also try a proxy server located outside China (that's assuming the great firewall of China doesn't manage to block proxies - maybe it does).

I think ultimately my point is what you want to do is most likely impossible, or at the very least incredibly difficult. For every tactic that thwarts the Chinese visitors, there is probably a way around it.

The only sure fire way to hide anything on the web is not to publish it.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved