Page MenuHomePhabricator

Google search results pointing to nonexistent https://donate.m.wikimedia.org/
Closed, ResolvedPublic

Description

If I search Google on a mobile device for "donate wikimedia" "donate wikipedia" or similar, then the search results point to https://donate.m.wikimedia.org/. This domain doesn't exist, we only have https://donate.wikimedia.org/.

www.google.com_search_q=donate+wikimedia&sca_esv=a657bfd6be99d848&ei=P6F9ZvFptfLQ8Q_F_I2YCQ&oq=donate+wikimedia&gs_lp=EhNtb2JpbGUtZ3dzLXdpei1zZXJwIhBkb25hdGUgd2lraW1lZGlhMgsQABiABBiRAhiKBTIFEAAYgAQyBBAAGB4yBBAAGB4yBhAAGAgYHjIGEAAYCBgeMgYQAB.png (2×1 px, 345 KB)
chrome-error___chromewebdata_(iPhone 12 Pro).png (2×1 px, 108 KB)

Google on desktop does point to the correct domain. DuckDuckGo and Bing both seem to work fine on mobile, so this might just be a Google problem

Event Timeline

Change #1050657 had a related patch set uploaded (by Ssingh; author: Ssingh):

[operations/puppet@production] varnish: redirect donate.wm.org Special:LandingPage to /

https://gerrit.wikimedia.org/r/1050657

Change #1050657 merged by Ssingh:

[operations/puppet@production] varnish: redirect donate.wm.org Special:LandingPage to /

https://gerrit.wikimedia.org/r/1050657

Change #1050669 had a related patch set uploaded (by Ssingh; author: Ssingh):

[operations/puppet@production] varnish: completely rewrite donate.m.wikimedia.org to donate.wikimedia.org

https://gerrit.wikimedia.org/r/1050669

Change #1050669 merged by Ssingh:

[operations/puppet@production] varnish: completely rewrite donate.m.wikimedia.org to donate.wikimedia.org

https://gerrit.wikimedia.org/r/1050669

Mentioned in SAL (#wikimedia-operations) [2024-06-28T19:31:32Z] <sukhe> sudo cumin -b10 "A:cp-text" "run-puppet-agent --enable 'dont enable'": T368645

We decided to redirect all donate.m to donate in VCL since before adding the DNS change for donate.m, it wasn't really pointing to anything so it should be fine and helps factor in any other corner-cases as well.

Change #1050672 had a related patch set uploaded (by Ssingh; author: Ssingh):

[operations/puppet@production] varnish: selectively redirect donate.m.wm.org

https://gerrit.wikimedia.org/r/1050672

Change #1050672 merged by Ssingh:

[operations/puppet@production] varnish: selectively redirect donate.m.wm.org

https://gerrit.wikimedia.org/r/1050672

Change #1051370 had a related patch set uploaded (by Ssingh; author: Ssingh):

[operations/puppet@production] varnish: make donate.m redirect permanent and add tests

https://gerrit.wikimedia.org/r/1051370

^ While we can maintain the VCL-level hacks for now, it would be best to both dig into how this actually happened (most likely, we ourselves emitted donate.m links from a wiki, probably donatewiki itself?), and to come up with a permanent solution at the application layer (fix the wiki to support these links properly and directly). We don't want to keep accumulating hacks like these in our already-overly-complex VCL code if unwarranted.

Change #1051370 merged by Ssingh:

[operations/puppet@production] varnish: make donate.m redirect permanent and add tests

https://gerrit.wikimedia.org/r/1051370

[…] it would be best to both dig into how this actually happened (most likely, we ourselves emitted donate.m links from a wiki, probably donatewiki itself?)

Indeed, it came from us in this way:

  • MobileFrontend was installed on donatewiki from the get-go using the same config as for other WMF wikis.
    • By itself, that doesn't do much when there is no DNS/Varnish redirect for donate.m.
    • Except, MobileFrontend is told there is a mobile domain on this wiki ($wgMobileUrlCallback = 'wmfMobileUrlCallback';) where wmf-config/MobileUrlCallback.php happily takes donate.wikimedia.org and returns donate.m.wikimedia.org.
  • MobileFrontend advertised this in two ways on every HTML response:
    • HTML metadata: <link rel="alternate" media="only screen and (max-width: 720px)" href="//donate.m.wikipedia.org/wiki/Banana"/>
    • HTML footer: <a href="https://donate.m.wikipedia.org/w/index.php?title=Banana&mobileaction=toggle_view_mobile">Mobile view</a>

This was actually reported in T321520 a few years ago, but worked around with CSS. However, that doesn't change the HTML, and most importantly it doesn't change the <link> metadata which tells Google to prefer that URL in results shown to mobile users of Google Search.

This has been fixed in two ways:

  • In mid-2024, around the same time as this task was filed, Google transitioned Wikimedia sites to no longer have a separate mobile URL in its index. See also RFC/Mobile domain sunsetting § Google from Feb 2025 and T405429#11244111 from Oct 2025.
  • MobileFrontend has been disabled on donate.wikimedia.org, thankyou.wikipedia.org, and other misc wikis where it was not actually setup. T152882, T406638

Change #1197695 had a related patch set uploaded (by Krinkle; author: Krinkle):

[operations/puppet@production] varnish: Enable enable_m_redir everywhere

https://gerrit.wikimedia.org/r/1197695

Change #1197695 merged by BCornwall:

[operations/puppet@production] varnish: Enable enable_m_redir everywhere

https://gerrit.wikimedia.org/r/1197695