Small SEO Tools

How to Exclude Boilerplate from Google Search Snippets

A notebook guide can contain useful advice followed by the same newsletter invitation used across the whole site. If a Google result highlights that invitation, the preview may tell readers little about the guide. You can mark that particular block with data-nosnippet while keeping it visible to visitors.

This is a focused template change. First identify the exact repeated block, keep the useful introduction outside it, and check the published HTML after saving.

Decide which text should represent the page

Google builds snippets automatically and can choose different passages for different searches. A meta description is another possible source, rather than a guaranteed replacement. Google documents both page-wide snippet controls and the data-nosnippet attribute for excluding selected text in its search snippet guidance.

For a fictional Paper Lane notebook guide, separate the content into two groups:

  • Keep eligible: an explanation of ruled, dotted and plain paper, available sizes, and how to choose a layout.
  • Exclude from the text snippet: the repeated invitation to join monthly studio updates.

Do not exclude a paragraph merely because it is shared. A short delivery explanation might answer the reader’s actual question. Make the decision from the purpose of this page.

Wrap the promotional block precisely

Here is an original template example. The wrapper ends before the next useful paragraph:

<h1>Notebook Paper Options</h1>
<p>Compare ruled, dotted and plain pages for everyday notes.</p>
<div data-nosnippet>
  <p>Get monthly studio updates from Paper Lane.
  Sign up for new collection news.</p>
</div>
<p>Choose a page layout and view the available notebook sizes.</p>

According to Google’s robots and snippet controls documentation:

  • Use the attribute on a span, div or section.
  • It is a boolean attribute. Writing data-nosnippet="false" still activates it; remove the attribute to turn it off.
  • Keep HTML valid and close the wrapper correctly.
  • Google may extract text before or after rendering. Avoid adding or removing the attribute on existing elements through JavaScript; include it when creating a new element.
  • Google needs crawl access to read the control.
  • Structured data inside the marked area can still be used for rich results.

The marked text remains public and visible. This is not a privacy measure or a request to remove the page from search. If removal is the actual goal, review the separate purpose of robots.txt and noindex before making changes.

Draft a useful alternative description

Open the SERP Snippet Preview and enter this fictional example:

  • Title tag: Notebook Paper Options
  • Page URL: https://example.com/notebooks/paper-options/
  • Meta description: Compare ruled, dotted and plain notebook pages, view the available sizes, and choose a paper layout for everyday notes.

Switch between Desktop and Mobile to compare the sample layouts. The description names what the page helps readers choose, instead of repeating the newsletter message. Use our meta description writing guide to adapt the wording to your actual content.

The preview works with the text you type. Entering a URL does not fetch the page, inspect its attributes or test Google’s results. Save your chosen description in the website editor separately.

Check the saved public page

  1. Open the public page in a separate browser tab after saving. Confirm that the promotion and the main article are both still visible.
  2. Inspect the served HTML and find data-nosnippet. Check the opening and closing wrapper against the template example.
  3. Confirm that the useful introduction and following paragraph sit outside that wrapper. Check another page using the same template for accidental overreach.
  4. Read the saved meta description. Make sure your editor retained the intended wording and did not create another description tag.

If the editor strips the attribute, the change has not reached the public page. Fix that template or editor integration before treating the work as finished.

Allow recrawling and compare real results

Google says recrawling may take days or weeks. Owners or full users can request indexing through Search Console, but a request guarantees neither immediate inclusion nor faster processing when repeated. See its recrawl instructions.

Record a relevant query, date and device when you compare results later. Look for whether the repeated promotion has disappeared, while remembering that another eligible passage may be chosen. If the wording still differs from your draft, follow the checks in why a search snippet differs from a preview.