Mobile app version of vmapp.org
Login or Join
Nickens628

: Chinese traffic redirection Our company website currently has 13 languages, of which Chinese is one. We have seen significant bounce rates from visitors in China (largely due to site speed there)

@Nickens628

Posted in: #Redirects

Our company website currently has 13 languages, of which Chinese is one. We have seen significant bounce rates from visitors in China (largely due to site speed there) and so we will be launching a standalone Chinese website that is hosted in mainland China in the coming days.

The new Chinese site features less functionality than our main site and highlights fewer products than our company offers - this is to aid our SEM/Weibo/Wechat campaigns in that market which only target specific products.

I don't want to redirect the Chinese language version of our website to the new Chinese site as 1) A Chinese speaking visitor is not necessarily currently within China 2) Our CDN doesn't include China meaning the new site will be a lot slower than our global site if you are outside of China 3) Our global site has seen years of MVT / AB testing.

Is it possible to redirect visitors from the Chinese language version of our site (this is in a subdirectory of our main site) to the new Chinese site ONLY if the visitor is located within China?

If possible, does this go against best practice?

To recap:

The Chinese website needs to be for visitors INSIDE China.
The Chinese version of our global site is for Chinese speaking visitors OUTSIDE China.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Nickens628

1 Comments

Sorted by latest first Latest Oldest Best

 

@Tiffany637

Assuming you're running Apache, this can be achieved with the mod_geoip and mod_rewrite modules.

Once you have those installed properly and your URL structures will be the same on the Chinese and non-Chinese sites, you can achieve your desired result with code that will look something like

RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(CN|HK)$
RewriteRule ^(.*)$ www.mydomain.cn/ [L]


This will basically look at the visitors country code returned by the geo_ip module. In this case, if it's CN or HK (Hong Kong) it will redirect the user to the same path their requesting on the "main" server, only at the domain mydomain.cn the at the end of that rule appends the current request to the new request.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme