How to handle Youtube

Written By Wolfgang Geiger

WordPress developer in Hong Kong specializing in making websites work in Mainland China. More information on the About Me page

Youtube is blocked in China, so if you embed a Youtube video on your website, the website won’t load or will only load very slowly.

There are three solutions to that, an 2 easy ones and a more difficult one:

Link video as image

The first easy solution is to add an image to your website and link it to the video on Youtube. This might look like this:

Youtube example video

For this, I simply took a screenshot of the embedded video, added the image instead of the video and linked it to Youtube.

Given that this is using Youtube’s logo and other icons, you might run into legal issues. The save version of the above would be to take your video thumbnail and create a similar looking image yourself and use that with a link to Youtube.

This way your visitors outside of China will be able to watch the video while in Mainland China, people can load the website with decent speed and will know to ignore the video.

Load the video from the server

This is also fairly easy to do, you simply upload the video to the media section on your WordPress backend and then add the video to your article.

Having said that, videos on your server come with higher bandwidth use and might, as a result, lead to higher costs.

Furthermore, make sure to not make the video auto-play or auto-load, otherwise, you’ll run into loading speed issues again in China.

Embed video based on country or language

This is the more tricky solution. The idea would be to check whether or not a visitor is coming from China based on the browser language or the IP address and then decide whether to show the Youtube video or not.

This sounds like the best solution, but will make your website quite a bit slower:

  • For one, you would have to run additional database queries (in the IP case) and that will, depending on server speed and visitor numbers affect the server performance
  • Far worse than that, however, is that caching will become a lot harder – in many cases impossible. And without caching, WordPress websites often end up being very, very slow.


If possible, go with solution 1 where you add the thumbnail or a screenshot of the embedded video and link it to Youtube.

It’s a bit unusual to see that, but might even be easier to use for people on mobile phones outside of Mainland China.

If you have questions or need help with your website, click on the button below to get in touch.

I'm looking forward to hearing from you!

Get in Touch