Page MenuHomePhabricator

Enable $wgMFNoindexPages for beta
Closed, ResolvedPublic

Description

We are not currently providing Google the metadata that they request in order to properly index mobile sites, in cases where you have a separate domain for them. T99587 has been tracking more general work, this ticket is for enabling the setting that results in MobileFrontend doing the right thing (since it's actually not clear that the code even works at the moment).

If working as expected, visiting a beta desktop site will result in a header tag like this:

<link rel="alternate" media"only screen and (max-width: 720px)" href="https://<desktop site/...." />

Developer notes

In T91183 such functionality was added by @Florian

Adding the following config

$wgMobileUrlTemplate = '%h0.m.%h1.%h2';
$wgMFNoindexPages = true;

will add a link tag to the document:

<link rel="alternate" media="only screen and (max-width: 720px)" href="">

Currently in production wgMFNoindexPages is false having been disabled by @MaxSem 5 years ago in Ia841ad77eacdf9b07222101f052e3c05f36dd02c. details there are slim (per discussion with google)

Event Timeline

Note: I suspect that this is going to result in the canonical link tag being doubled up. Easy fix if so.

Change 462819 had a related patch set uploaded (by Imarlier; owner: Imarlier):
[operations/mediawiki-config@master] Beta: enable MobileFrontend and move some config in to labs settings

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

Change 462819 merged by jenkins-bot:
[operations/mediawiki-config@master] Beta: enable MobileFrontend and move some config in to labs settings

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

Imarlier removed a project: Patch-For-Review.

Activated and verified in beta.