Page MenuHomePhabricator

Fundraising message displayed as description for some search results by Google
Closed, ResolvedPublicBUG REPORT

Description

Google is apparently using a fundraising message for Wikipedia as the description for some search results. This is problematic as it means people may not be able to understand what an article is about without clicking the link. A potential solution for this problem could be outputting a meta description tag.

Google's docs about this: https://developers.google.com/search/docs/appearance/snippet

image.png (340×1 px, 42 KB)

PS. I have not noticed the same thing on DuckDuckGo.

Event Timeline

Oops! we had seen this long ago and found a way around it by making sure banners weren't displayed to search scrapers. With all the evolution in search tech, I guess they are now getting banners just like regular readers. We'll have to come up with another fix.

Found the task for the earlier (2014) instance of this: T76743: CentralNotice contents appearing in Google search snippets. The remedy was to block Special:BannerLoader from being loaded by bots in robots.txt, and add a bit in the JS to avoid inserting banner contents when the naviagator's UA indicated that it was a spider:

https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/177598

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralNotice/+/177627/1/modules/ext.centralNotice.bannerController/bannerController.js

The JS guard seems to have been removed during some refactors, but the robots.txt block is still there (though it has been combined to block all Special: namespace pages)

https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/411255

Change #1175528 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/CentralNotice@master] Add data-nosnippet attr on CN div

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

@R4356th are you still seeing these? I haven't been able to get them to appear again in any search results. I wonder if their scraper stopped obeying robots.txt for a bit and is now behaving again.

If we want to be totally sure, the patch I just pushed up against this should add that data-nosnippet attr to the HTML container for the banner text. There is precedent for adding it to the local sitenotice div as well: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/985355

Yeah, I cannot see these either. It seems like your theory regarding Google misbehaving is correct but considering we don't really know why that happened perhaps the attribute should be added nonetheless?

Change #1175528 merged by jenkins-bot:

[mediawiki/extensions/CentralNotice@master] Add data-nosnippet attr on CN div

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

XenoRyet set Final Story Points to 1.