Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop cookie text appearing in Google snippets #1185

Merged
merged 1 commit into from
Oct 31, 2019
Merged

Conversation

sihugh
Copy link
Contributor

@sihugh sihugh commented Oct 31, 2019

We've noticed that the cookie text appears sometimes in Google results where the search text contains some of the words within (such as https://www.google.com/search?q=government+gateway)

The nosnippet attribute should prevent the cookie banner appearing in snippets such as those where we've implemented the FAQPage schema.

Screenshot 2019-10-29 14 49 11

We've noticed that the cookie text appears sometimes in Google results where
the search text contains some of the words within (such as
https://www.google.com/search?q=government+gateway)

The [nosnippet attribute](https://developers.google.com/search/reference/robots_meta_tag#data-nosnippet-attr)
should prevent the cookie banner appearing in snippets such as those
where we've implemented the FAQPage schema.
@sihugh sihugh merged commit 3553f48 into master Oct 31, 2019
@sihugh sihugh deleted the google-snippet branch October 31, 2019 09:40
@sihugh sihugh mentioned this pull request Oct 31, 2019
sihugh added a commit to alphagov/static that referenced this pull request Mar 30, 2020
hannalaakso added a commit to alphagov/govuk-frontend that referenced this pull request Oct 27, 2021
The data-nosnippet attribute stops the 'show' text from appearing in any Google Search text snippets.

We have successfully used a similar approach for the [cookie banner](#2192)
and on [GOV.UK Publishing components](alphagov/govuk_publishing_components#1185)
hannalaakso added a commit to alphagov/govuk-frontend that referenced this pull request Oct 27, 2021
The data-nosnippet attribute stops the 'show' text from appearing in any Google Search text snippets.

We have successfully used a similar approach for the [cookie banner](#2192)
and on [GOV.UK Publishing components](alphagov/govuk_publishing_components#1185)
hannalaakso added a commit to alphagov/govuk-frontend that referenced this pull request Oct 28, 2021
The data-nosnippet attribute stops the 'show' text from appearing in any Google Search text snippets.

We have successfully used a similar approach for the [cookie banner](#2192)
and on [GOV.UK Publishing components](alphagov/govuk_publishing_components#1185)
hannalaakso added a commit to alphagov/govuk-frontend that referenced this pull request Nov 1, 2021
The data-nosnippet attribute stops the 'show' text from appearing in any Google Search text snippets.

We have successfully used a similar approach for the [cookie banner](#2192)
and on [GOV.UK Publishing components](alphagov/govuk_publishing_components#1185)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants