?
Solved

How to Restrict a website from being viewed in china.

Posted on 2006-06-02
7
Medium Priority
?
597 Views
Last Modified: 2008-02-26
Hi,
    I was wondering if there is a way do disable my website from being viewed in china. Any help would be greatly appreciated.
0
Comment
Question by:dave1184
  • 3
  • 2
6 Comments
 
LVL 9

Expert Comment

by:smidgie82
ID: 16818934
Hi dave1184,

The primary way to do this would be based upon IP address or Hostname, but these aren't consistent.  You could easily (under Apache) make a RewriteRule that detects the hostname of the other side and if it's from the china suffix, return a Forbidden status code.  Unfortunately, most hosts that will be visiting your site probably don't have a canonical host name (and even if they do, reverse-DNS lookups to find out the hostname can be very expensive if you're experiencing high traffic).  So, you would have to collect a database of the geographical locations of various Class A, B, and C networks, and do a lookup against your database for each request.  This would work in most cases, but many class C networks are shared across multiple geographies, so you would have some Chinese citizens using a class B network from a neighboring country that would be allowed through, and some from neighboring countries using Chinese class C networks that would be denied access.  And, of course, your database would be VERY large.  And the real down side is that anyone could just go through a proxy in another nation, and you'd be unable to tell the difference.

So, the short answer is yes, you could block views from the lower echelon of computer users going through domains or networks that are easily identifiable as Chinese, but you cannot block everyone, and even trying to block a majority of users will require a large amount of overhead and maintenance on your part.

Hope that helps.

~Dathan

0
 
LVL 10

Accepted Solution

by:
ClickCentric earned 750 total points
ID: 16819583
Actually, the short answer is no as there's no way to disable the site from being viewed from all of China.  There are a couple of maybe's if just limiting the amount of connections that are possible from China and one somewhat questionable yes that would likely work for just about all of china, but may be a bit much to go through to do it. Really it depends on whether or not you're in china and trying to prevent others there from seeing it or you're outside of china and you have a reason to want people in china to avoid the site.  If it's the former, then as smidgie82 mentioned, you can only limit it as the 'questionable yes' would probably not work out well for you.  If you're outside of China, then there is a way.  The same way that China controls access to the internet in general from their country (How do you think google managed to get china to agree to expanding their search engine to a version for china?).   In other words, you can't technically block all of China from getting to your site, but you can get China to block basically everyone from China from being able to get to your site.   You just need them to want to do so.
0
 
LVL 2

Expert Comment

by:warrefnallen
ID: 16821629
anti-chinese postings can get you shot bro. be careful =) haha
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:smidgie82
ID: 16821704
ClickCentric,

Good point.  I'd forgotten that the Chinese gov't has control over the networks in the nation.  So yeah, getting people in China to be unable to view your site is probably pretty easy.  Just collect all the anti-Chinese propaganda and news stories you can find and post them or links to them on your site.  Should do the trick.  (c:
0
 
LVL 10

Expert Comment

by:ClickCentric
ID: 16821737
Well, as I said, it's a 'questionable' method, but, if someone really wanted the site to not be viewable from china for whatever reason...it is known to work.
0
 
LVL 9

Expert Comment

by:smidgie82
ID: 16989969
Since we got no feedback from the asker, I'd recommend a delete - no refund.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question