- Don't put Google Analytics in the header (or don't use it) otherwise will block/delay the browser load the website.
Most of the websites just timeout because of those 3 things and make the website imposible to navigate.
If you host your website in a normal VPS, without using Google services you will have a quite nice chance that the website loads pretty fast there in China.
My biggest frustration while browsing in China was reCAPTCHA. Most websites would load fine, but then they would detect that I was in a new location and this would trigger their account protection bullshit and ask me to complete a reCAPTCHA that...wouldn’t load. This happened ALL THE TIME and is just excruciating.
Sometimes there wouldn’t even be UI that would load to indicate something was wrong. Logins would just fail with cryptic messages.
The Decentraleyes Firefox extension alleviates this somewhat as it caches popular things like jquery (that are often hosted by Google) locally on your device, making foreign websites load quicker.
I think we can avoid Google font CDNs for fonts but we can use them from our assets i.e download the font and use it from your assets instead of Google CDN.
You can still use them, but a different URL. Google has a CDN in China for those fonts and stuff. Also Google Analytics are not blocked at all in China.
Stackoverflow use Google CDN. The one to be blamed is the chinese GFW. but it will be much better if they do not use google service. Maybe they do not bother to serve user in china.
Only if the vanilla analytics product without any adwords or partner scheme options (i.e. coming from google-analytics.com rather than anything coming from Google.com). Plus it could disappear on a whim (as did Bing for a couple of days last month), so unless the use-case is unavoidable, why not self-host?
* I've been hosting my Chinese blog in US vps since 2009 and it works fine.
* I have Gitea hosted in US vps and it works fine too.
* GoDaddy has Alipay (sort of China's PayPal) up for a long time.
* ICP Licenses are easy to get (at least for Chinese) and typically take less a month. I've done it for my company's websites and my clients' websites.
* ICP licenses are required only if you want to host your website in China. Hosting in China is ridiculously expensive and many Chinese go out of their way to host elsewhere. For 9$ a month you get 1 cpu, 1G ram and 1MBit bandwidth, which translates to 128kb/s.
To make your website load, and load fast in China:
* Remove Google fonts, Google cdn, resources from FB, twitter, etc. this should fix 95% of your problem.
* Avoid well-known host providers (AWS, Vultr, Linode) if you can, they tend to get banned.
* Get a host with CN2. I heard hosting in Hong Kong is fast too. It's only necessary if you really want your site to be lightning fast. As a Chinese, if I'm visiting your website and your website is in English, then I probably expect it to be slow, so...
CN2 is basically a fast lane to China that you can buy from one of China's biggest internet providers (China Telecom). It has two flavors, CN2GT[0] and CN2GIA[1], CN2GIA is said to be faster.
Some vps providers buy these fast lanes, make their vps fast to access in China, and sell them to hungry Chinese users. The most popular one is Bandwagon[2].
Having used Alibaba Cloud for the past few years, and having been in China for the past month, I would say:
> If I host in Europe or US would the speed of traffic going into China be very slow? ... Will I be able to serve 1Gbps to China from that EU server?
Not sure about 1Gbps, but I've seen my 200Mbps band basically saturated. It's rather spotty though -- definitely not 200Mbps all the time. Latency is a very big problem here, so make sure you do TCP tuning right; without TCP tuning you might see awful speeds.
> That is insanely expensive. How can startups in China handle that kind of hosting cost? Where do they host their websites?
The insanely expensive part is bandwidth. For instance with Alibaba Cloud, a 1 vCPU, 1G RAM, 20G SSD instance with pay-as-you-go network billing is like $6/mo so it's not that bad, and there are promotions year round so if you're committed for say one year at a time you can usually get it for maybe half the list price, but outbound bandwidth is a whopping $0.123/GB (which is actually not that different from AWS/GCP's Asia pricing).
I don't know about startups but I suppose it's fine if you host static assets through a CDN and only use the expensive bandwidth from compute for truly dynamic content.
> If I host in Europe or US would the speed of traffic going into China be very slow?
I'm not sure, but I guess it should be nowhere near 1Gbps. You'll have to test it to find out.
> How can startups in China handle that kind of hosting cost?
It's mainly bandwidth that's expensive, but there is cheap cdn/cloud storage for static files, like videos. Then you can also pay by traffic, which is around $0.12/Gb.
How do you manage to work during the night? External internet gets throttled so much that trying to load pages like Gitlab take minutes and a simple `git pull` can take 5 minutes. All VPNs stop working and even obscure sites like payment providers and Slack seem to only run at around 5kbps. I'm guessing it's not normal for people to work outside of 9-6?
> Get a host with CN2. I heard hosting in Hong Kong is fast too.
Tested Alibaba Cloud in honkers from Shenzhen and Guangzhou late last year for a couple weeks as a Shadow Socks host. Worked really well, <10milsec ping.
That said, its not day to day that i've had probs with Honker <~> Mainland traffic. It's the seemingly random network performance degradation that bites.
Thanks, I live in China too. I want to know is it easy to update ip address associated with ICP license? I seek an option to transfer from more expensive to cheaper vps solution and want to maintain icp license I already got.
As far as I know, you can't do that, since your ICP license is tied to a host provider (like Aliyun), if you host your site somewhere else, you risk having your license revoked.
Ive lived in mainland China most of last 12 years and work in software. The last paragraph is key one for most websites. You have to remove use of all G, FB and related site scripts because these will not run. There are good alternatives anyway so do yourself a favor and replace them with self-hosted or other 3rd party alternatives.
There are sites for testing what is blocked in China - you should test all 3rd party scripts you are using to make sure they run ok.
Just read the article again only to realize the late paragraph was not "Good luck! Please enable JavaScript to view the comments powered by Disqus." LOL
Anyway, before I had a stable proxy, I actually set up my local DNS to redirect all .google.com., .facebook.com. and their CDNs to 127.0.0.1 just so I can "unblock" some other webpages. That was not a good experience.
Those script can actually be delayed from loading so they won't block the page. You don't need to actually remove them, just load them AFTER your page is loaded, and then most things will be fine. (Except for Google Recaptcha of course)
It's a good practice to un-trust everything you don't have control, and maybe make exceptions from there. Don't by default trust everything.
we moved everything we could to a mainland provider, generally there are good alternatives and cdn's for common stuff. what keeps biting is our tracking and re-conversion scripts that our marketing team insists on.
I have a fairly international website geared towards English language learners, with Google Analytics and AdSense and links to share on Facebook, hosted on Digital Ocean here in NYC...
and, without designing for it, China has been my #1 source of traffic and revenue for many years now, simply because they're the #1 largest population of English language learners.
It seems to be working fine. I mean, maybe my share of Chinese traffic could be even bigger, but does anyone have any hard numbers showing this is a problem? Or are Chinese users aware of slow loads but just put up with it?
If your website doesn't use anything that's being actively blocked by the firewall (e.g. Google CDN), it is most likely usable in China, although it'd be quite slow.
I browse tons of foreign websites when I grew up in China. It's actually not a big issue if the website doesn't serve video.
Not that this is a recommended solution, but VPNs work from inside of China.
I lived with some Chinese students while I was exchanging and basically they said most people that want out of the Fire wall can just VPN out with no repercussions expected. Not that it’s ideal, but some commenters seem to believe that people in China have no access to the outside world which just isn’t true.
Before the internet the USSR could censor effectively, but now it’s pretty hard with encryption being as good as it is.
Of course there are people in China that don’t know that VPNs exist, but I think it’s an important nuance to mention that many people are able to have an open online experience.
As well, I think the Chinese government has demonstrated multiple times during "sensitive times" in recent years that they can make commercial VPN services nonfunctional at the snap of a finger. If a commercial VPN service is working, it is because of the Chinese government's mercy, not because of the commercial VPN's technological ingenuity.
It leaves a bad taste in my mouth when I see commercial VPN providers advertising that they are the best or only VPN service to work in China. I remember one time I saw a viral Astrill ad floating around that said something to the effect: "We're happy that our VPN service is working great for our customers. But please don't post that your VPN service is working great. We work really hard to develop new technologies and get around the Chinese firewall, and if you keep bragging about it, the Chinese government could find out, it will make it harder for our services to work."
Super bad taste in my mouth. Come on, you know that the very first customers to download new clients are from the Chinese government working to figure out how to get it blocked. Hate this kind of disingenuous marketing.
edit: I will say that it is true that most commercial VPN services do seem to be used for most of the year and work well enough without consequences; the law seems to exist, but does not always get enforced. Would be interesting to see if China starts ratcheting up the fines over time.
I traveled to China for about a month and a half a few years ago. Everything was excruciatingly slow. Except for Hacker News. Probably more about the payload size than anything else. :)
How many companies work hard to make their services readily available in China? Any notable exceptions?
HN occasionally becomes very, very slow (30-second load times), but usually this is just if you’re logged in and requesting templated content, as the front page is cached and loads instantly on a non-logged-in device. It does make a good connection test!
This can depend on how you access to Internet. In my experience a Hong Kong travel SIM is best as everything will be pretty efficiently routed via honkers and uncensored. My home country SIM sucked as everything was routed back to my home country which is an awful round trip if you are trying to access a mainland site or service. If you are on a mainland travel SIM local services should be on par with what you use in the west and a good VPN should be pretty fast (especially if your gateway is honker).
Maybe you were primarily trying to access services outside of China?
Within China things can be decently fast and low latency - from what I hear - and it is a large place with a lot of compute infrastructure.
You have to treat it as its own world. Where on the outside, all we see is the chaos and interruption of a hurricane, but there is a center that is harder to see where people go about their daily lives and have decent amenities and ux.
- Stop using Google CDNs
- Stop using Google fonts
- Don't put Google Analytics in the header (or don't use it) otherwise will block/delay the browser load the website.
Most of the websites just timeout because of those 3 things and make the website imposible to navigate.
If you host your website in a normal VPS, without using Google services you will have a quite nice chance that the website loads pretty fast there in China.
edit: formatting
Sometimes there wouldn’t even be UI that would load to indicate something was wrong. Logins would just fail with cryptic messages.
I know some enterprise environments are, not surprisingly, not too fond of 3rd-party scripts, and their firewalls could be nearly as bad too.
I think we can avoid Google font CDNs for fonts but we can use them from our assets i.e download the font and use it from your assets instead of Google CDN.
Stackoverflow use Google CDN. The one to be blamed is the chinese GFW. but it will be much better if they do not use google service. Maybe they do not bother to serve user in china.
Deleted Comment
PS: VPN is a blocked keyword, so we say "use internet scientifically"
Dead Comment
* I've been hosting my Chinese blog in US vps since 2009 and it works fine.
* I have Gitea hosted in US vps and it works fine too.
* GoDaddy has Alipay (sort of China's PayPal) up for a long time.
* ICP Licenses are easy to get (at least for Chinese) and typically take less a month. I've done it for my company's websites and my clients' websites.
* ICP licenses are required only if you want to host your website in China. Hosting in China is ridiculously expensive and many Chinese go out of their way to host elsewhere. For 9$ a month you get 1 cpu, 1G ram and 1MBit bandwidth, which translates to 128kb/s.
To make your website load, and load fast in China:
* Remove Google fonts, Google cdn, resources from FB, twitter, etc. this should fix 95% of your problem.
* Avoid well-known host providers (AWS, Vultr, Linode) if you can, they tend to get banned.
* Get a host with CN2. I heard hosting in Hong Kong is fast too. It's only necessary if you really want your site to be lightning fast. As a Chinese, if I'm visiting your website and your website is in English, then I probably expect it to be slow, so...
Some vps providers buy these fast lanes, make their vps fast to access in China, and sell them to hungry Chinese users. The most popular one is Bandwagon[2].
[0] https://www.ctamericas.com/products-services/internet/global...
[1] https://www.ctamericas.com/products-services/internet/global...
[2] https://bandwagonhost.com/cart.php
If I host in Europe or US would the speed of traffic going into China be very slow?
If I get a 1Gbps server in EU most likely I can serve 1Gbps to USA. Will I be able to serve 1Gbps to China from that EU server?
> For 9$ a month you get 1 cpu, 1G ram and 1MBit bandwidth
That is insanely expensive. How can startups in China handle that kind of hosting cost? Where do they host their websites?
> Get a host with CN2
What's CN2? Where can I find their website?
> If I host in Europe or US would the speed of traffic going into China be very slow? ... Will I be able to serve 1Gbps to China from that EU server?
Not sure about 1Gbps, but I've seen my 200Mbps band basically saturated. It's rather spotty though -- definitely not 200Mbps all the time. Latency is a very big problem here, so make sure you do TCP tuning right; without TCP tuning you might see awful speeds.
> That is insanely expensive. How can startups in China handle that kind of hosting cost? Where do they host their websites?
The insanely expensive part is bandwidth. For instance with Alibaba Cloud, a 1 vCPU, 1G RAM, 20G SSD instance with pay-as-you-go network billing is like $6/mo so it's not that bad, and there are promotions year round so if you're committed for say one year at a time you can usually get it for maybe half the list price, but outbound bandwidth is a whopping $0.123/GB (which is actually not that different from AWS/GCP's Asia pricing).
I don't know about startups but I suppose it's fine if you host static assets through a CDN and only use the expensive bandwidth from compute for truly dynamic content.
I'm not sure, but I guess it should be nowhere near 1Gbps. You'll have to test it to find out.
> How can startups in China handle that kind of hosting cost?
It's mainly bandwidth that's expensive, but there is cheap cdn/cloud storage for static files, like videos. Then you can also pay by traffic, which is around $0.12/Gb.
Tested Alibaba Cloud in honkers from Shenzhen and Guangzhou late last year for a couple weeks as a Shadow Socks host. Worked really well, <10milsec ping.
That said, its not day to day that i've had probs with Honker <~> Mainland traffic. It's the seemingly random network performance degradation that bites.
There are sites for testing what is blocked in China - you should test all 3rd party scripts you are using to make sure they run ok.
Anyway, before I had a stable proxy, I actually set up my local DNS to redirect all .google.com., .facebook.com. and their CDNs to 127.0.0.1 just so I can "unblock" some other webpages. That was not a good experience.
Those script can actually be delayed from loading so they won't block the page. You don't need to actually remove them, just load them AFTER your page is loaded, and then most things will be fine. (Except for Google Recaptcha of course)
It's a good practice to un-trust everything you don't have control, and maybe make exceptions from there. Don't by default trust everything.
I have a fairly international website geared towards English language learners, with Google Analytics and AdSense and links to share on Facebook, hosted on Digital Ocean here in NYC...
and, without designing for it, China has been my #1 source of traffic and revenue for many years now, simply because they're the #1 largest population of English language learners.
It seems to be working fine. I mean, maybe my share of Chinese traffic could be even bigger, but does anyone have any hard numbers showing this is a problem? Or are Chinese users aware of slow loads but just put up with it?
I browse tons of foreign websites when I grew up in China. It's actually not a big issue if the website doesn't serve video.
I lived with some Chinese students while I was exchanging and basically they said most people that want out of the Fire wall can just VPN out with no repercussions expected. Not that it’s ideal, but some commenters seem to believe that people in China have no access to the outside world which just isn’t true.
Before the internet the USSR could censor effectively, but now it’s pretty hard with encryption being as good as it is.
Of course there are people in China that don’t know that VPNs exist, but I think it’s an important nuance to mention that many people are able to have an open online experience.
https://www.scmp.com/news/china/policies-politics/article/21...
https://www.scmp.com/news/china/policies-politics/article/21...
https://www.scmp.com/tech/policy/article/2180960/chinese-vpn...
As well, I think the Chinese government has demonstrated multiple times during "sensitive times" in recent years that they can make commercial VPN services nonfunctional at the snap of a finger. If a commercial VPN service is working, it is because of the Chinese government's mercy, not because of the commercial VPN's technological ingenuity.
It leaves a bad taste in my mouth when I see commercial VPN providers advertising that they are the best or only VPN service to work in China. I remember one time I saw a viral Astrill ad floating around that said something to the effect: "We're happy that our VPN service is working great for our customers. But please don't post that your VPN service is working great. We work really hard to develop new technologies and get around the Chinese firewall, and if you keep bragging about it, the Chinese government could find out, it will make it harder for our services to work."
Super bad taste in my mouth. Come on, you know that the very first customers to download new clients are from the Chinese government working to figure out how to get it blocked. Hate this kind of disingenuous marketing.
edit: I will say that it is true that most commercial VPN services do seem to be used for most of the year and work well enough without consequences; the law seems to exist, but does not always get enforced. Would be interesting to see if China starts ratcheting up the fines over time.
https://arstechnica.com/information-technology/2016/06/red-a...
https://en.m.wikipedia.org/wiki/Internet_Water_Army
https://news.ycombinator.com/item?id=17103136
Dead Comment
How many companies work hard to make their services readily available in China? Any notable exceptions?
Within China things can be decently fast and low latency - from what I hear - and it is a large place with a lot of compute infrastructure.
You have to treat it as its own world. Where on the outside, all we see is the chaos and interruption of a hurricane, but there is a center that is harder to see where people go about their daily lives and have decent amenities and ux.