Description for configuration directive $mfNoIndexPages say:
#### $wgMFNoindexPages Set to false to allow search engines to index your mobile pages. So far, Google seems to mix mobile and non-mobile pages in its search results, creating confusion. * Type: `Boolean` * Default: `true`
But this is completely wrong. If $wgMFNoindexPages set to true - only header
<link rel="alternate" media="only screen and (max-width: 720px)" href="https://m.example.com/wiki/Page_Name"/>
added to mobile pages and indexing mobile pages by search engines is not forbidden, see code in MobileFrontend/includes/MobileFrontend.hooks.php for details:
// an canonical/alternate link is only useful, if the mobile and desktop URL are different // and $wgMFNoindexPages needs to be true if ( $mfMobileUrlTemplate && $mfNoIndexPages ) { $link = false; if ( !$context->shouldDisplayMobileView() ) { // add alternate link to desktop sites - bug T91183 $desktopUrl = $title->getFullUrl(); $link = [ 'rel' => 'alternate', 'media' => 'only screen and (max-width: ' . self::DEVICE_WIDTH_TABLET . ')', 'href' => $context->getMobileUrl( $desktopUrl ), ]; } elseif ( !$title->isSpecial( 'MobileCite' ) ) { // Add canonical link to mobile pages (except for Special:MobileCite), // instead of noindex - bug T91183. $link = [ 'rel' => 'canonical', 'href' => $title->getFullUrl(), ]; } if ( $link !== false ) { $out->addLink( $link ); } }
Code for $wgMFNoindexPages directive and documentation for $wgMFNoindexPages is mismatch.
May be it is good idea to rename configuration directive $mfNoIndexPages and update it documentation?
Also see https://developers.google.com/search/mobile-sites/mobile-seo/separate-urls for details, adding
<link rel="alternate" media="only screen and (max-width: 720px)" href="https://m.example.com/wiki/Page_Name"/>
is not forbid search engines to index mobile pages.