Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Google has a generic "google" meta tag for controlling some aspects of their search indexing:
- Do not enable the sitelinks search box:
<meta name="google" content="nositelinkssearchbox" />
- Do not attempt an automatic translation of the content into other languages:
<meta name="google" content="notranslate" />
Comment | File | Size | Author |
---|---|---|---|
#9 | metatag-n2532596-9.interdiff.txt | 1.17 KB | DamienMcKenna |
#9 | metatag-n2532596-9.patch | 1.84 KB | DamienMcKenna |
|
Comments
Comment #1
alzz CreditAttribution: alzz at Metadrop commentedA first attempt to implement Google nositelinkssearchbox metatag for Drupal 8.
Looks like this metatag it is not generic for all search engines so must be under google name.
The nostranslate metatag it is already implemented in the module.
Comment #2
alzz CreditAttribution: alzz at Metadrop commentedAttaching the correct the patch, the previous one is a mess.
Comment #3
DamienMcKennaThank you!
Lets see what the testbot says.
Comment #4
tunicTestbot says everything is ok, should this issue be in RTBC?
Comment #5
DamienMcKennaThis patch is hardcoded for the first scenario, it doesn't allow for the second scenario.
Comment #6
alzz CreditAttribution: alzz at Metadrop commentedSorry but I dont understand what do you mean with the first and second scenarios.
Comment #7
thejimbirch CreditAttribution: thejimbirch at Kanopi Studios commentedAttached is an updated patch. The patch in #2 had one field for
nositelinkssearchbox
using a checkbox, and had the field incorrectly in the Google Custom Search Engine (CSE) module.The attached patch moves the field into the main metatag module, and puts it in the advanced group. It also changes it to a text input so users can add
nositelinkssearchbox
,notranslate
, or both. I also updated the field's description to include more details, and a link to the Meta tags that Google understands Search Console help article.Comment #8
thejimbirch CreditAttribution: thejimbirch at Kanopi Studios commentedGoogle Webmaster Trends Analyst John Mu confirmed that these tags can be combined in this week's Google Webmaster Hangout.
https://www.youtube.com/watch?v=asmUDAzWKdI&t=2350
Comment #9
DamienMcKennaA small improvement to the wording, and to note the comment from the video that they can be combined if comma-separated.
Comment #11
DamienMcKennaCommitted. Thanks.
Comment #12
DamienMcKennaComment #14
sriharsha.uppuluri CreditAttribution: sriharsha.uppuluri as a volunteer commentedHi,
I'm not able to see the google field under advanced section on a drupal vanila instance. I can see the code in codebase but not displaying.