Panduan nosnippet

nosnippet kills snippet untuk sebuah whole halaman; data-nosnippet hides hanya one bagian. scopes, valid-HTML gotcha, dan AI Overviews angle.

Pertama kali diterbitkan: 23 Jun 2026 · Terakhir diperbarui: 3 Agu 2026 · Advanced
Bahasa

nosnippet dan data-nosnippet both suppress snippet text, di berbeda scopes. nosnippet adalah sebuah robots directive — sebuah meta-robots nilai atau sebuah X-Robots-Tag header — itu kills snippet text dan video preview untuk whole halaman (though sebuah static image thumbnail dapat masih tampilkan), menghapus featured-snippet eligibility, dan (per Google) drops konten sebagai sebuah direct input untuk AI Overviews dan AI Mode. data-nosnippet adalah sebuah HTML attribute, valid hanya pada span/div/bagian, itu hides hanya wrapped bagian — dari both regular dan featured snippets — while rest dari halaman stays eligible; ini adalah sebuah boolean attribute, markup harus menjadi valid, closed HTML atau sebuah unclosed tag swallows everything setelah ini, dan data terstruktur inside ini stays usable. nosnippet equals max-snippet:0 untuk text; neither touches pengindeksan atau rankings; Bing mendukung nosnippet tetapi documents no data-nosnippet. Google adalah juga testing sebuah separate property-tingkat Search generative AI control di Search Console.

TL;DR — nosnippet adalah sebuah robots directive (<meta name="robots" content="nosnippet"> atau sebuah X-Robots-Tag: nosnippet header) itu suppresses text snippet dan video preview untuk whole halaman, menghapus featured-snippet eligibility, dan — per Google — drops konten sebagai sebuah direct input untuk AI Overviews dan AI Mode. untuk text ini equals max-snippet:0, dan pada conflict more restrictive aturan wins (nosnippet beats max-snippet:50). data-nosnippet adalah sebuah HTML attribute, valid hanya pada span/div/section, itu excludes one bagian — dari both regular dan featured snippets; ini adalah boolean (apa pun nilai adalah ignored), markup harus menjadi valid, closed HTML atau sebuah unclosed tag swallows everything setelah ini, dan data terstruktur inside ini stays usable. Neither touches pengindeksan atau rankings, dan nosnippet doesn’t guarantee zero visuals (sebuah static image thumbnail dapat masih tampilkan). Bing honors nosnippet; ini documents no data-nosnippet.

Evidence for this claim Google's nosnippet directive prevents a text snippet and video preview from being shown for the page in search results. Scope: Google Search presentation; it does not itself remove the URL from the index. Confidence: high · Verified: Google Search Central: Robots directives Evidence for this claim Google's data-nosnippet attribute can exclude text within span, div, and section elements from snippets. Scope: Section-level Google snippet control; valid, well-formed HTML is required. Confidence: high · Verified: Google Search Central: data-nosnippet

Two controls, two scopes

Choose by scope: `nosnippet` removes the page preview; `data-nosnippet` excludes only selected HTML from Google's snippet.

Nosnippet is a page-level robots directive that removes the whole text snippet and video preview and prevents direct use in Google AI features. Data-nosnippet is an attribute on a span, div, or section that excludes only the properly wrapped valid HTML. Both control display rather than indexing or ranking.

whole thing comes down untuk scope. nosnippet berfungsi di halaman tingkat; data-nosnippet berfungsi di bagian tingkat. People reach untuk wrong one constantly, so pertahankan ini straight:

  • nosnippet — sebuah nilai di sebuah robots meta tag atau X-Robots-Tag header. Whole-halaman suppression.
  • data-nosnippet — sebuah HTML attribute pada span/div/section. One-bagian suppression.

Both adalah display controls. mereka sit alongside rest dari robots meta tag family dan X-Robots-Tag header, dan mereka’re suppression cousins dari max-snippet / max-image-preview length controls.

nosnippet — halaman-tingkat robots directive

Syntax (meta tag dan header)

di HTML, Anda set ini pada robots meta tag:

<meta name="robots" content="nosnippet">

untuk anything itu isn’t HTML — PDFs, images, lainnya files where Anda dapat’t tambahkan sebuah <head> — Anda kirim ini sebagai sebuah respons header HTTP instead:

X-Robots-Tag: nosnippet

sama directive, two delivery mechanisms. header route adalah satu-satunya cara untuk reach non-HTML resources.

What ini actually menghapus

Google’s spec adalah plain: nosnippet berarti “Do not show a text snippet or video preview in the search results for this page.” (terjemahan) “melakukan not tampilkan sebuah text snippet atau video preview di hasil pencarian untuk ini halaman.” itu’s broader daripada ini sounds. Per yang sama doc, ini “applies to all forms of search results (at Google: web search, Google Images, Discover, AI Overviews, AI Mode) and will also prevent the content from being used as a direct input for AI Overviews and AI Mode.” (terjemahan) “applies untuk semua forms dari hasil pencarian (di Google: web search, Google Images, menemukan, AI Overviews, AI Mode) dan akan juga mencegah konten dari menjadi digunakan sebagai sebuah direct input untuk AI Overviews dan AI Mode.”

Evidence for this claim Google's nosnippet directive prevents a text snippet and video preview from being shown for the page in search results. Scope: Google Search presentation; it does not itself remove the URL from the index. Confidence: high · Verified: Google Search Central: Robots directives

So one directive melakukan four things:

  1. menghapus text snippet.
  2. menghapus video preview.
  3. menghapus featured-snippet eligibility — Google says jika Anda ingin sebuah guaranteed cara out dari featured snippets, nosnippet adalah ini.
  4. menghapus konten sebagai sebuah direct input untuk AI Overviews dan AI Mode.

One qualification worth knowing: nosnippet doesn’t guarantee sebuah completely bare listing. Google’s spec menambahkan itu “a static image thumbnail (if available) may still be visible, when it results in a better user experience.” (terjemahan) “sebuah static image thumbnail (jika available) dapat masih menjadi terlihat, when ini hasil di sebuah better pengguna experience.” So Anda’re guaranteed no text snippet dan no video preview — not necessarily zero visuals.

Evidence for this claim Google's nosnippet directive prevents a text snippet and video preview from being shown for the page in search results. Scope: Google Search presentation; it does not itself remove the URL from the index. Confidence: high · Verified: Google Search Central: Robots directives

jika Anda tidak set ini, default adalah itu “Google may generate a text snippet and video preview based on information found on the page.” (terjemahan) “Google dapat generate sebuah text snippet dan video preview berdasarkan informasi ditemukan pada halaman.”

Relationship untuk max-snippet:0

nosnippet adalah functionally equivalent untuk max-snippet:0 untuk text — Google documents itu 0 untuk max-snippet berarti “No snippet is to be shown. Equivalent to nosnippet.” (terjemahan) “No snippet adalah untuk menjadi ditampilkan. Equivalent untuk undefined.” difference adalah itu max-snippet juga takes positive nilai (cap snippet di N characters) where nosnippet adalah semua-atau-nothing.

When robots aturan conflict, ** more restrictive one applies**. Google’s own contoh: “if a page has both max-snippet:50 and nosnippet rules, the nosnippet rule will apply.” (terjemahan) “jika sebuah halaman memiliki both undefined dan undefined aturan, undefined aturan akan apply.”

Evidence for this claim `max-snippet:0` is equivalent to `nosnippet`, and if `nosnippet` conflicts with less restrictive snippet rules it takes precedence. Scope: public web and verified properties as applicable Confidence: high · Verified: Robots meta tag, data-nosnippet, and X-Robots-Tag specifications

data-nosnippet — bagian-tingkat HTML attribute

Syntax dan official contoh

Anda designate sebuah chunk dari text untuk menjadi dipertahankan out dari snippet oleh putting attribute pada element itu wraps ini. Google: “You can designate textual parts of an HTML page not to be used as a snippet. This can be done on an HTML-element level with the data-nosnippet HTML attribute on span, div, and section elements.” (terjemahan) “Anda dapat designate textual bagian dari sebuah HTML halaman not untuk menjadi digunakan sebagai sebuah snippet. ini dapat menjadi done pada sebuah HTML-element tingkat dengan undefined HTML attribute pada undefined, undefined, dan undefined elements.” itu three elements adalah whole allowed list — ini melakukan not berfungsi pada arbitrary tags.

Evidence for this claim Google's data-nosnippet attribute can exclude text within span, div, and section elements from snippets. Scope: Section-level Google snippet control; valid, well-formed HTML is required. Confidence: high · Verified: Google Search Central: data-nosnippet

Here’s Google’s own contoh, verbatim:

<p>This text can be shown in a snippet
<span data-nosnippet>and this part would not be shown</span>.</p>

<div data-nosnippet>not in snippet</div>
<div data-nosnippet="true">also not in snippet</div>
<div data-nosnippet="false">also not in snippet</div>
<!-- all values are ignored -->

<div data-nosnippet>some text</html>
<!-- unclosed "div" will include all content afterwards -->

ini adalah sebuah boolean attribute

Notice ="true" dan ="false" lines above behave identically. itu’s because, di Google’s kata, “The data-nosnippet is considered a boolean attribute. As with all boolean attributes, any value specified is ignored.” (terjemahan) “ undefined adalah considered sebuah boolean attribute. sebagai dengan semua boolean attributes, apa pun nilai specified adalah ignored.” Presence adalah what penting — don’t bother giving ini sebuah nilai, dan don’t assume ="false" turns ini off. ini doesn’t.

valid-HTML requirement ( failure mode)

ini adalah bagian almost nobody covers, dan ini adalah paling umum alasan data-nosnippet silently doesn’t berfungsi. Google parses attribute dari rendered markup, so: “To ensure machine-readability, the HTML section must be valid HTML and all appropriate tags must be closed accordingly.” (terjemahan) “untuk ensure machine-readability, HTML bagian harus menjadi valid HTML dan semua appropriate tags harus menjadi closed accordingly.”

lihat last line dari Google’s contoh again — <div data-nosnippet>some text</html>. div adalah tidak pernah closed, dan Google’s comment spells out hasil: “unclosed div will include all content afterwards.” (terjemahan) “unclosed undefined akan sertakan semua konten afterwards.” di lainnya kata, sebuah unclosed protected region doesn’t hide more, ini hides nothing — everything setelah open tag leaks back ke snippet. jika Anda data-nosnippet isn’t taking, periksa bahwa wrapping element adalah actually closed.

JavaScript caveat

One more dari spec: “To avoid uncertainty from rendering, do not add or remove the data-nosnippet attribute of existing nodes through JavaScript.” (terjemahan) “untuk hindari uncertainty dari rendering, jangan tambahkan atau hapus undefined attribute dari existing nodes melalui JavaScript.” Put ini di server-rendered HTML dan leave ini there. Toggling ini client-side introduces exactly jenis dari rendering ambiguity valid-HTML aturan adalah trying untuk mencegah. membangun elements dynamically adalah fine — Google’s guidance adalah untuk set attribute di creation time, not untuk mutate existing nodes: “When adding DOM elements through JavaScript, include the data-nosnippet attribute as necessary when initially adding the element to the page’s DOM.” (terjemahan) “When menambahkan DOM elements melalui JavaScript, sertakan undefined attribute sebagai necessary when initially menambahkan element untuk halaman’s DOM.”

bagian-tingkat exclusion isn’t limited untuk regular snippets — sebuah bagian wrapped di data-nosnippet adalah juga dipertahankan out dari featured snippets. dan jika sebuah halaman carries both sebuah halaman-tingkat nosnippet dan sebuah bagian-tingkat data-nosnippet, halaman-tingkat aturan adalah more restrictive one, so ini takes priority untuk whole halaman.

data-nosnippet juga doesn’t touch data terstruktur cara Anda mungkin assume: Google says “structured data remains usable for search results when declared within a data-nosnippet element.” (terjemahan) “data terstruktur remains usable untuk hasil pencarian when declared di dalam sebuah undefined element.” Don’t generalize attribute past text snippet eligibility — ini isn’t sebuah access-control mechanism dan ini doesn’t hide images atau lainnya media pada halaman; ini hanya mempertahankan wrapped text out dari snippet selection (dengan documented max-snippet/deskripsi-field nuances Google covers untuk data terstruktur separately).

Which one untuk gunakan

decision adalah almost selalu tentang scope dan intent:

  • Hide whole snippet (dan exit featured snippets / AI Overviews untuk halaman) → nosnippet.
  • Hide hanya one paragraf atau block while rest dari halaman mempertahankan -nya snippet → data-nosnippet.
  • hanya shorten snippet alih-alih kill ini → itu’s max-snippet:N, length control, not ini.
  • Apply ini untuk sebuah PDF atau lainnya non-HTML fileX-Robots-Tag: nosnippet, since there’s no <head> untuk put sebuah meta tag di.

menghapus konten dari AI Overviews

2025–2026 alasan sebuah lot dari people land pada ini topic adalah AI Overviews. mechanics berfungsi — nosnippet dan data-nosnippet melakukan hapus konten sebagai sebuah direct input — tetapi expect latency. di Glenn Gabe’s case study, nosnippet pulled his konten out dari sebuah AI Overview quickly, tetapi effect adalah initially pendek-lived dan konten reappeared sebelum ini settled; setelah John Mueller weighed di, removal melakukan ultimately stick — ini hanya took longer untuk fully process. So jika Anda apply ini dan konten’s masih showing, give ini time sebelum assuming ini failed.

dan mind trade-off Gabe flagged: whole-halaman nosnippet juga strips Anda normal snippet, leaving sebuah awkward, deskripsi-less listing di ten blue tautan. jika Anda hanya perlu untuk hapus bagian dari konten dari AI surfaces, bagian-tingkat data-nosnippet (atau sebuah max-snippet cap) adalah gentler lever.

There’s juga sebuah newer, separate control worth knowing tentang: Google adalah testing sebuah property-tingkat “Search generative AI” (terjemahan) “Search generative AI” control di Search Console — sebuah sertakan/exclude/inherit setting itu scopes untuk AI Overviews, AI Mode, dan generative AI di menemukan. ini adalah distinct dari halaman-tingkat nosnippet (which adalah sebuah per-halaman HTML/header aturan) dan dari Google-Extended (which governs AI training dan grounding, not Search preview eligibility). rollout adalah limited, dan per Google, propagation dari sebuah perubahan dapat take sebuah day atau two, atau longer. Don’t reach untuk ini sebagai Anda default — ini adalah sebuah Search Console setting layered pada top dari halaman-tingkat controls above, not sebuah replacement untuk them.

Evidence for this claim As of 2026-07-17, Google is testing a separate property-level Search generative AI include/exclude/inherit control for AI Overviews, AI Mode and generative AI in Discover; it does not affect other Search ranking/inclusion or AI training. Scope: public web and verified properties as applicable Confidence: high · Verified: Google common crawlers: Google-Extended

Bing dan lainnya mesin

sebuah parity caveat worth saying out loud: Bing mendukung nosnippet (dan snippet-length controls), tetapi Bing melakukan not document data-nosnippet. bagian-tingkat attribute appears untuk menjadi Google-spesifik. jika Anda perlu bagian-tingkat snippet control untuk hold everywhere, hanya Google guarantees ini — don’t assume Bing honors sebuah data-nosnippet wrapper.

Apple documents sebuah berbeda, berguna boundary: dengan nosnippet, Apple dapat masih gunakan halaman’s judul untuk matching dan penemuan, tetapi ini akan not gunakan halaman konten sebagai context untuk generative models. itu adalah sebuah Apple-spesifik gunakan-control notice, not sebuah generic claim itu nosnippet menghapus URL dari penemuan.

Evidence for this claim Apple says a page marked nosnippet may still be matched or discovered using its title, but the page content is not used as context for generative models. Scope: Applebot and Apple generative-model context use; it does not describe Google, Bing, or generic indexing behavior. Confidence: high · Verified: Apple Support: About Applebot

cost Anda’re accepting

ini adalah worth menjadi honest itu snippet eligibility adalah sebuah nyata, losable asset. I learned itu blunt cara dengan * Story dari Blocking 2 tinggi-peringkat halaman dengan Robots.txt* — when I blocked two dari kami peringkat halaman di robots.txt, paling terlihat casualty adalah itu mereka lost semua dari mereka featured snippets. itu adalah robots.txt, not nosnippet, tetapi lesson transfers: giving up snippet eligibility adalah sebuah deliberate cost. difference adalah itu nosnippet dan data-nosnippet let Anda give ini up precisely — whole halaman atau one bagian, pada purpose — alih-alih sebagai collateral damage dari sebuah crawl block. Spend ini where ini adalah worth spending.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.