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)

Details

Related Gerrit Patches:

Event Timeline

Imarlier created this task.Sep 25 2018, 9:44 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 25 2018, 9:44 PM
Imarlier moved this task from Inbox to Doing on the Performance-Team board.Sep 25 2018, 9:44 PM

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

Jdlrobson updated the task description. (Show Details)Sep 26 2018, 8:11 PM
Jdlrobson added subscribers: Florian, MaxSem.

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 closed this task as Resolved.Oct 2 2018, 6:15 PM
Imarlier removed a project: Patch-For-Review.

Activated and verified in beta.