Sitenotice can appear as the preview in search results on google
Closed, ResolvedPublicBUG REPORT

Description

If a wiki has a sitenotice, and if that sitenotice is pretty substantial it sometimes appears as the preview for a search result in Google. This is a bad preview, since it's the same for every page.

We should add the data-nosnippet attribute to sitenotices, to tell Google (and other search engines?) not to use them in their previews. We already use this for printfooter, so it's presumably uncontroversial to expand it to here.

Event Timeline

Change 985355 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/core@master] Add data-nosnippet to the sitenotice container

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

There was a previous task for this for CentralNotice: T76743. The change made in the patch that fixed it isn't currently present, so this may in fact be a regression.

This was specifically pointed out because of the current arwiki protest. It's presumably particularly prevalent here because the protest sitenotice contains the only blocks of English text on the page, and so searching on English-Google might well heavily prioritize displaying that content.

image.png (1×1 px, 400 KB)

Change 985355 merged by jenkins-bot:

[mediawiki/core@master] Add data-nosnippet to the sitenotice container

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

DLynch claimed this task.

Missed closing this because of the holidays.