Guide To Speed Up Site in China

Yes, there’s a bunch of websites that discuss tips to optimize the speed of your website in China. However, few of them are brutally outdated, and the rest may sound complicated to bloggers and entrepreneurs with little to no experience. Skip introduction.

February 08, 2019: Planning to start a new blog in China? I’ve prepared the definitive guide to start a blog. Purchase ExpressVPN or SocketPro subscription (if you’re in China) and build your blog based on Namecheap, DigitalOcean, GeneratePress, and Cloudflare.

I’ve prepared this guide for newbie bloggers and small to medium-sized businesses that run a website or blog, intended to cater both international and the Chinese users.

If you are planning to set up a brand new WordPress site, go ahead read my blog post on “How to Start A WordPress Blog in China.”

Bonus: I’d bust some common myths via this article. E.g., “host your site in China for the best speed,” “WordPress won’t work well in China” etc.

Now buckle up and start optimizing your website for China.

8 Steps to optimize the speed of your website in China

Step 1: Monitor The Website Performance

The first thing to do is understand your website’s loading speed in the greater China region. Services like tools.pingdom.com and PageSpeed Insights (Google) are great.

The only problem is Pingdom free version doesn’t allow you to test from Asia – China region and Google usually pings your site from US IPs.

Need an alternative? Here’s a list of free tools to test website load time from China

  • https://www.webpagetest.org
  • https://www.site24x7.com/web-page-analyzer.html
  • https://www.dotcom-tools.com/website-speed-test.aspx
  • https://ce.baidu.com/index/performance (You need to sign-up)

Usually, after a first test run, these sites will give you tips on how to improve the loading time. These tips are great, but you need to go further to optimize the site for China.

Fun Fact: mighil.com loads faster than a digital marketing agency based in Shanghai that wrote an article on the same topic (real bummer, innit?).

Mighil.com Loading Time, Shanghai, 3.1 Seconds.
Performance Summary of Mighil.com.

Now here are some workarounds to make your optimize your website and the server so that the site content will render fast!

Step 2: Reduce TTFB

Google defines TTFB as a period of “waiting”:

Time spent waiting for the initial response, also known as the Time To First Byte.

This time captures the latency of a round trip to the server in addition to the time spent waiting for the server to deliver the response.

Read More About TTFB on Wikipedia

webpagetest.org indicates your site’s TTFB in the “First Byte” section of the results page.

There are “n” number of methods to reduce First Byte Time. But, I’d suggest finding the root of the problem before changing the host or purchasing a CDN service.

You could initiate a chat with your webmaster or hosting provider first, get insights from them, then decide what to do next.

Here are some recommended best practices to reduce First Byte Time.

1. Improve the server configuration: These methods will vary according to what web server you are using. A lot of readers aren’t tech savvy, so it is wise to leave this duty to your webmaster. Ask your webmaster to optimize Apache or NGINX for better TTFB. Head over to https://stackoverflow.com to view recommendations and insights that may sound optimal for you.

2. Use a CDN: Using a good quality CDN can help deliver your static content, like images and scripts, faster to users via a network of servers worldwide. Aliyun (from Alibaba), Tencent Cloud CDN and Akamai are some of the best CDN service providers for China.

Pro Tip: Do not have the budget to buy a premium CDN service? The cheapest workaround is to move your server to Hong Kong or Singapore region. Digital Ocean‘s Singapore node servers work flawlessly in China.

Warning: Cloudflare CDN (free package) is known for its high TTFB. Do no use Cloudflare CDN’s free service to improve TTFB; it’ll work the other way around.

Step 3: Reduce The Website Page Size

Waterfall Chart of Mighil.com, 138.32KB in Total.
Waterfall Chart for Mighil.com.

Yeah, it’s the modern age. Everyone has better internet at home or at work. But that doesn’t mean you’ve to create a 10MB index page. The site load time will go up if you don’t reduce your web page’s size. It’ll affect your ranking also.

Ideally, your website should load within 4 seconds at least (if it’s not hosted in China). You should compress whenever it’s necessary. Do not use a site builder like WPBakery if you are using WordPress. WPBakery’s CSS is quite bloated in my opinion.

Step 4: Use lightweight WordPress Themes

WordPress, Joomla, and Magento are great content management systems and e-commerce platforms to manage blogs and e-commerce stores.

For example, if you are maintaining a blog based on WordPress that caters Chinese audience, you should stick with optimal settings when it comes to the themes. There’s a ton of “heavy” WordPress themes that may potentially decrease the performance of your site.

But, WordPress is Blocked in China, right?

No. WordPress sub-domain loads blazing fast in China.

Or use Baidu; you can find mirror links to download WP package anyway.

WordPress is famous here, and I know few people who run a WordPress blog in China by throwing Cloudflare on top of it. However, a lot of Chinese web devs or companies don’t prefer WordPress in general as a CMS platform. They tend to build their own CMS based on PHP or Node.js etc.

And local bloggers in general, they prefer Chinese CMSs or blogging platforms over WP. I moderate Chengdu Living, an expat community-focused website based on WP. And it works well without a VPN. Same with this site, mighil.com. Feel free to check out my WP beginners guide for bloggers in China for more detailed info.

I’d suggest GeneratePress framework (developed by Tom Usborne) if you’re building a new site intended to the users in China.

GeneratePress is insanely lightweight, and it loads very fast. Read my GeneratePress WordPress theme review if you’re interested.

Look at mighil.com for example. My site is built on GeneratePress framework and powered by a San Francisco based server. Still, it promises a decent load time (2 to 4 seconds) in China.

Speed Up Your Site With GeneratePress

The best framework for any site in China.

Get it Here.

Step 5: Usage Of Web Fonts or Fonts in General

Web font usage is another important factor when it comes to slowing down your websites in China.

Don’t even think about using Google fonts or Adobe Typekit fonts. Both works if you’ve got an optimized CDN. But it is still not recommended to fetch fonts from GFW blocked resources.

Here are a few alternatives:

Google Font Alternative for China

google-webfonts-helper” lets you download your favorite Google fonts for offline use.

Google Font Alternative for China, google-webfonts-helper by Mario Ranftl
Visit https://google-webfonts-helper.herokuapp.com/fonts/

Which means, you can download Google fonts to your PC in .otf formats, upload to your server and fetch them directly using @font-face in the stylesheet.

Adobe Typekit Alternative for China

Quite tricky. You should completely avoid Adobe Typekit and purchase the license for the fonts from the designers. Then you could upload eot, ttf, svg, woff and woff2 files and use them within your CSS snippet.

Use System Font Stacks

Recommended approach if you want the site to load even faster. A “system font stack” is a way of telling the web browser to use the font your operating system is already using.

So, what’s your call? A website with custom fonts (that adds at least 100kb page-size + respective loading time) or the one that loads blazing fast?

Here’s an example code snippet you could use in the CSS:

body * {font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";}

Step 6: Inspecting Links To External Resources

Make sure your site(s)’ CSS, images, video files or JavaSCript does not load from external resources blocked by Chinese internet a.k.a the GFW.

The best approach is to host everything locally (recommended) or use a CDN optimized for China.

Step 7: WordPress Caching

Running a blog based on WordPress (CMS)? Make use of a caching plugin called Autoptimize developed by Frank Goossens (futtta). Autoptimize makes optimizing your site easy. It can aggregate, minify and cache scripts and styles, injects CSS in the page head by default (but can also defer), moves and defers scripts to the footer and minifies HTML.

The “Extra” options allow you to optimize Google Fonts and images, async non-aggregated JavaScript, remove WordPress core emoji cruft and more.

Autoptimize

Step 8: Hire Someone

Last resort. Hire a web performance expert if you aren’t able to optimize everything by yourself. I’d also recommend this to people with little to no working knowledge of HTML, servers or CMS in general.

I do offer such services for a price of flat 100USD per audit and 50USD per hour for on-page/server optimization. I provide custom speed up services for your site on any hosting platform: shared, VPS or dedicated (ranging from DigitalOcean to Aliyun).

Speed Up Your Site Today!

Get in touch with me to optimize your site and server

Send a message!