Page MenuHomePhabricator

Google search traffic sending users to the wrong Chinese language versions of Wikipedia
Closed, DuplicatePublicBUG REPORT


Hi all - feel free to add others to this ticket as I'm not sure exactly who the correct owner should be.

Our contacts at Google reached out to say one of their engineering teams is having a technical issue where Google Search results are displaying or linking to the wrong versions of Chinese Wikipedia, and they're asking if there's someone they can connect with to troubleshoot.

Specifically, the technical issues cited by the Google team are:
When Chinese Wikipedia makes on-the-fly C2C conversion (plus some word replacement), the Google system can't tell which Chinese variant it is receiving unless href="/wiki/....." is replaced with href="/zh-{region}/...." It seems this isn't working because of the automatic referrer-dependent redirection.

Google has asked if it would be possible for Wikipedia to stop redirecting{region,script}/<subject> coming from Google search (or Google crawler) to<subject> because as long as this redirects Google cannot send its users to the right version of Chinese Wikipedia.

I believe the links below are to the relevant supporting documentation on our side. If someone could let me know who to connect with internally about this I'd appreciate it - thanks!

Event Timeline

It seems this isn't working because of the automatic referrer-dependent redirection

Yes. The function is provided by a gadget on zhwiki:
I think the two links you provided are unrelated. T108443: Google doesn't honor canonical URLs of is more relevant.

Per T108443#6279559, T294716 is likely to help, but the patch connected needs to be amended, and the owner of it seems not active.

Hi @Func

IMHO, I think fixing the canonical url won't solve the issue. Removing the canonical url will.

Even if Google honors the canonical urls, I don't think the search results will show what we want.

We shouldn't be setting canonical url to /wiki on chinese variants pages. The localized pages have their own title. Setting the canonical url to /wiki makes them all show the same title in google search results.

I would suggest we remove the canonical url.

I'm happy to help making the code changes if we agree on doing this.

Cross-posted in

Change 879579 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/core@master] Make meta canonical URL language-variant-aware