Hướng dẫn về nosnippet
nosnippet kills đó snippet cho một toàn bộ trang; dữ liệu-nosnippet hides chỉ một section. Đó scopes, đó hợp lệ-HTML gotcha, và đó AI Overviews angle.
Ngôn ngữ
nosnippet và dữ liệu-nosnippet cả hai suppress snippet text, tại khác nhau scopes. nosnippet là một robots directive — một meta-robots giá trị hoặc an X-Robots-Tag header — đó kills đó snippet text và video preview cho đó toàn bộ trang (though một static image thumbnail có thể vẫn cho thấy), xóa featured-snippet eligibility, và (theo Google) drops đó nội dung as một trực tiếp input để AI Overviews và AI Chế độ. dữ liệu-nosnippet là an HTML thuộc tính, hợp lệ chỉ on span/div/section, đó hides chỉ đó wrapped section — từ cả hai regular và featured snippets — trong khi đó rest of đó trang vẫn giữ eligible; đây là một boolean thuộc tính, đó markup phải được hợp lệ, closed HTML hoặc an unclosed tag swallows mọi thứ sau điều này, và dữ liệu có cấu trúc bên trong điều này vẫn giữ usable. nosnippet equals max-snippet:0 cho text; neither touches lập chỉ mục hoặc thứ hạng; Bing hỗ trợ nosnippet nhưng documents không dữ liệu-nosnippet. Google là cũng kiểm thử một tách biệt thuộc tính-cấp độ Tìm kiếm generative AI control trong Search Console.
TL;DR — MỘT snippet là đó bit of descriptive text dưới của bạn kết quả trong Google.
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-nosnippetnosnippettells Google để cho thấy không snippet text cho đó toàn bộ trang — bạn nhận mostly chỉ một tiêu đề và URL (Google says một static image thumbnail có thể vẫn cho thấy trong một số trường hợp).data-nosnippetlà hơn surgical: wrap một paragraph trong điều này và chỉ đó paragraph là hidden từ đó snippet, trong khi đó rest of đó trang có thể vẫn cho thấy. Neither một xóa trang của bạn từ Google hoặc thay đổi của bạn thứ hạng — they chỉ thay đổi điều gì cho thấy trong đó listing.
Điều gì một snippet là, và đó hai ways để suppress điều này
Khi trang của bạn cho thấy lên trong Google, đó engine thường pulls một line hoặc hai of text để cho thấy dưới của bạn link. đó là đó snippet. Theo mặc định Google ghi điều này cho bạn từ whatever on đó trang.
Sometimes bạn không muốn đó text shown — maybe đây là paywalled nội dung, hoặc điều gì đó sensitive, hoặc bạn đơn giản không muốn Google lifting một chunk of trang của bạn vào đó kết quả. Bạn có hai tools:
nosnippet— hides đó snippet cho đó entire trang. Bạn thêm điều này as một robots meta tag (hoặc gửi điều này as an HTTP header). Đó kết quả là một bare listing: tiêu đề và URL, không mô tả.data-nosnippet— hides chỉ một section. Bạn thêm điều này as an thuộc tính on mộtspan,div, hoặcsectionkhoảng đó text bạn muốn kept out. Mọi thứ bên ngoài đó wrapper có thể vẫn là dùng trong đó snippet.
Đó trang-cấp độ một: nosnippet
Drop này trong đó <head> và đó toàn bộ trang snippet goes away:
<meta name="robots" content="nosnippet">MỘT couple of điều để know: này cũng takes bạn out of featured snippets (đó boxed câu trả lời tại đó top), và Google says điều này xóa nội dung của bạn as một trực tiếp input để AI Overviews và AI Chế độ. Đó trade-off là đó của bạn thông thường listing hiện tại looks một bit bare — không mô tả dưới đó link (một nhỏ image thumbnail có thể vẫn cho thấy, nhưng đó text là đã biến mất).
Đó section-cấp độ một: data-nosnippet
Wrap đó text bạn muốn để giữ out of đó snippet:
<p>This part can show in a snippet
<span data-nosnippet>but this part won't</span>.</p>Đó hầu hết quan trọng catch: đó HTML có để là hợp lệ và properly closed. Nếu bạn forget để close đó tag, Google own warning là đó điều này’ll bao gồm all đó nội dung sau điều này anyway — so đó protection silently fails.
Điều gì điều này làm không làm
nosnippet và data-nosnippet không xóa trang của bạn từ Google và không
thay đổi của bạn thứ hạng. Đó trang vẫn indexes và vẫn ranks — điều này chỉ cho thấy
không có đó snippet text. Nếu bạn thực ra muốn một trang đã biến mất, đó là một khác nhau
control (một noindex on đó robots meta tag, covered elsewhere).
Muốn đó chính xác spec language, đó max-snippet:0 sự tương đương, đó AI-Overviews
lag, và đó Bing caveat? Chuyển để đó Advanced tab.
TL;DR —
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-nosnippetnosnippetlà một robots directive (<meta name="robots" content="nosnippet">hoặc anX-Robots-Tag: nosnippetheader) đó suppresses đó text snippet và đó video preview cho đó toàn bộ trang, xóa featured-snippet eligibility, và — theo Google — drops đó nội dung as một trực tiếp input để AI Overviews và AI Chế độ. Cho text điều này equalsmax-snippet:0, và on conflict đó hơn restrictive rule wins (nosnippetbeatsmax-snippet:50).data-nosnippetlà an HTML thuộc tính, hợp lệ chỉ onspan/div/section, đó excludes một section — từ cả hai regular và featured snippets; đây là boolean (bất kỳ giá trị là đã bỏ qua), đó markup phải được hợp lệ, closed HTML hoặc an unclosed tag swallows mọi thứ sau điều này, và dữ liệu có cấu trúc bên trong điều này vẫn giữ usable. Neither touches lập chỉ mục hoặc thứ hạng, vànosnippetkhông bảo đảm zero visuals (một static image thumbnail có thể vẫn cho thấy). Bing honorsnosnippet; điều này documents khôngdata-nosnippet.
Hai controls, hai scopes
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.
Đó toàn bộ điều xuất hiện xuống để phạm vi. nosnippet hoạt động tại đó trang cấp độ;
data-nosnippet hoạt động tại đó section cấp độ. Mọi người reach cho đó sai một
constantly, so giữ này straight:
nosnippet— một giá trị trong một robots meta tag hoặc đóX-Robots-Tagheader. Toàn bộ-trang suppression.data-nosnippet— an HTML thuộc tính onspan/div/section. Một-section suppression.
Cả hai là display controls. They sit alongside đó rest of đó robots meta tag
family và đó X-Robots-Tag header, và họ là đó suppression cousins of
đó max-snippet / max-image-preview length controls.
nosnippet — đó trang-cấp độ robots directive
Syntax (meta tag và header)
Trong HTML, bạn set điều này on đó robots meta tag:
<meta name="robots" content="nosnippet">Cho bất cứ điều gì đó không HTML — PDFs, images, other files nơi bạn không thể thêm một
<head> — bạn gửi điều này as an HTTP header phản hồi thay vì:
X-Robots-Tag: nosnippetGiống nhau directive, hai phân phối mechanisms. Đó header route là đó chỉ way để reach non-HTML các tài nguyên.
Điều gì điều này thực ra xóa
Google spec là đơn giản: nosnippet có nghĩa là “Do not show a text snippet or video
preview in the search results for this page.” (bản dịch) «Không cho thấy một text snippet hoặc video preview trong đó kết quả tìm kiếm cho này trang.» đó là rộng hơn điều này sounds. Theo
đó giống nhau doc, điều này “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.” (bản dịch) «áp dụng để all forms of kết quả tìm kiếm (tại Google: web tìm kiếm, Google Images, Discover, AI Overviews, AI Chế độ) và sẽ cũng ngăn đó nội dung từ đang dùng as một trực tiếp input cho AI Overviews và AI Chế độ.»
So một directive làm four điều:
- Xóa đó text snippet.
- Xóa đó video preview.
- Xóa featured-snippet eligibility — Google says nếu bạn muốn một guaranteed
way out of featured snippets,
nosnippetlà điều này. - Xóa đó nội dung as một trực tiếp input để AI Overviews và AI Chế độ.
Một qualification worth knowing: nosnippet không bảo đảm một completely bare
listing. Google spec adds đó “a static image thumbnail (if available) may
still be visible, when it results in a better user experience.” (bản dịch) «một static image thumbnail (nếu khả dụng) có thể vẫn là visible, khi điều này dẫn đến một tốt hơn người dùng experience.» So bạn là
guaranteed không text snippet và không video preview — không nhất thiết zero visuals.
Nếu bạn không set điều này, đó default là đó “Google may generate a text snippet and video preview based on information found on the page.” (bản dịch) «Google có thể generate một text snippet và video preview dựa trên information được tìm thấy on đó trang.»
Mối quan hệ để max-snippet:0
nosnippet là functionally tương đương để max-snippet:0 cho text — Google
documents đó 0 cho max-snippet có nghĩa là “No snippet is to be shown. Equivalent
to nosnippet.” (bản dịch) «Không snippet là để là shown. Tương đương để nosnippet.» Đó khác biệt là đó max-snippet cũng takes positive các giá trị
(cap đó snippet tại N characters) nơi nosnippet là all-hoặc-không có gì.
Khi robots rules conflict, đó hơn restrictive một áp dụng. Google own
ví dụ: “if a page has both max-snippet:50 and nosnippet rules, the
nosnippet rule will apply.” (bản dịch) «nếu một trang có cả hai max-snippet:50 và nosnippet rules, đó nosnippet rule sẽ apply.»
data-nosnippet — đó section-cấp độ HTML thuộc tính
Syntax và đó chính thức ví dụ
Bạn designate một chunk of text để là kept out of đó snippet by putting đó
thuộc tính on đó element đó wraps điều này. 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.” (bản dịch) «Bạn có thể designate textual parts of an HTML trang không để là dùng as một snippet. Này có thể là đã xong on an HTML-element cấp độ với đó data-nosnippet HTML thuộc tính on span, div, và section elements.» Những three elements là đó toàn bộ được phép list — điều này làm không hoạt động
on arbitrary tags.
Ở đây Google own ví dụ, 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 -->đây là một boolean thuộc tính
Notice đó ="true" và ="false" lines trên behave identically. đó là
vì, trong Google words, “The data-nosnippet is considered a boolean
attribute. As with all boolean attributes, any value specified is ignored.” (bản dịch) «Đó data-nosnippet là considered một boolean thuộc tính. As với all boolean các thuộc tính, bất kỳ giá trị specified là đã bỏ qua.»
Presence là điều gì matters — không bother giving điều này một giá trị, và không assume
="false" turns điều này off. Điều này không.
Đó hợp lệ-HTML requirement (đó chế độ lỗi)
Này là đó part gần như không ai covers, và đây là đó hầu hết phổ biến reason
data-nosnippet silently không hoạt động. Google parses đó thuộc tính từ được kết xuất
markup, so: “To ensure machine-readability, the HTML section must be valid HTML
and all appropriate tags must be closed accordingly.” (bản dịch) «Để bảo đảm machine-readability, đó HTML section phải được hợp lệ HTML và all appropriate tags phải được closed accordingly.»
Xem đó cuối cùng line of Google ví dụ again — <div data-nosnippet>some text</html>. Đó div là không bao giờ closed, và Google comment spells out đó
kết quả: đó “unclosed div will include all content afterwards.” (bản dịch) «unclosed div sẽ bao gồm all nội dung afterwards.» Trong other
words, an unclosed protected region không hide hơn, điều này hides không có gì —
mọi thứ sau đó open tag leaks lại vào đó snippet. Nếu của bạn
data-nosnippet không taking, kiểm tra rằng đó wrapping element là thực ra closed.
Đó JavaScript caveat
Một hơn từ đó spec: “To avoid uncertainty from rendering, do not add or
remove the data-nosnippet attribute of existing nodes through JavaScript.” (bản dịch) «Để tránh uncertainty từ kết xuất, không thêm hoặc xóa đó data-nosnippet thuộc tính of existing nodes qua JavaScript.» Put
điều này trong đó máy chủ-được kết xuất HTML và leave điều này ở đó. Toggling điều này client-side
introduces chính xác đó kind of kết xuất ambiguity đó hợp lệ-HTML rule là trying
để ngăn. Building elements dynamically là fine — Google hướng dẫn là để set
đó thuộc tính tại creation time, không để 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.” (bản dịch) «Khi thêm DOM elements qua JavaScript, bao gồm đó data-nosnippet thuộc tính as necessary khi initially thêm đó element để đó trang DOM.»
Điều này excludes featured snippets cũng, và dữ liệu có cấu trúc vẫn hoạt động bên trong điều này
Đó section-cấp độ exclusion không limited để regular snippets — một section wrapped
trong data-nosnippet là cũng kept out of featured snippets. Và nếu một trang
carries cả hai một trang-cấp độ nosnippet và một section-cấp độ data-nosnippet, đó
trang-cấp độ rule là đó hơn restrictive một, so điều này takes priority cho đó toàn bộ
trang.
data-nosnippet cũng không touch dữ liệu có cấu trúc đó way bạn có thể assume:
Google says “structured data remains usable for search results when declared
within a data-nosnippet element.” (bản dịch) «dữ liệu có cấu trúc vẫn usable cho kết quả tìm kiếm khi declared trong một data-nosnippet element.» không generalize đó thuộc tính past text
snippet eligibility — điều này không an access-control mechanism và điều này không hide
images hoặc other media on đó trang; điều này chỉ giữ đó wrapped text out of snippet
selection (với đó được ghi lại max-snippet/mô tả-trường nuances Google
covers cho dữ liệu có cấu trúc riêng).
Mà một để dùng
Đó decision là gần như luôn về phạm vi và intent:
- Hide đó toàn bộ snippet (và exit featured snippets / AI Overviews cho đó
trang) →
nosnippet. - Hide chỉ một paragraph hoặc block trong khi đó rest of đó trang giữ của nó
snippet →
data-nosnippet. - Chỉ shorten đó snippet thay vì kill điều này → đó là
max-snippet:N, đó length control, không những. - Apply điều này để một PDF hoặc other non-HTML file →
X-Robots-Tag: nosnippet, since có không<head>để put một meta tag trong.
Removing nội dung từ AI Overviews
Đó 2025–2026 reason một lot of mọi người land on này topic là AI Overviews. Đó
mechanics hoạt động — nosnippet và data-nosnippet làm xóa nội dung as một trực tiếp
input — nhưng expect latency. Trong Glenn Gabe case nghiên cứu, nosnippet pulled his
nội dung out of an AI Overview quickly, nhưng đó effect đã là initially ngắn-lived
và đó nội dung reappeared trước điều này settled; sau John Mueller weighed trong, đó
removal đã làm ultimately stick — điều này chỉ took lâu hơn để fully xử lý. So nếu bạn
apply điều này và đó nội dung vẫn cho thấy, cho điều này time trước assuming điều này failed.
Và mind đó trade-off Gabe flagged: toàn bộ-trang nosnippet cũng strips của bạn
thông thường snippet, leaving an awkward, mô tả-ít hơn listing trong đó ten blue
links. Nếu bạn chỉ cần để xóa part of đó nội dung từ AI surfaces,
section-cấp độ data-nosnippet (hoặc một max-snippet cap) là đó gentler lever.
có cũng một newer, tách biệt control worth knowing về: Google là kiểm thử một
thuộc tính-cấp độ “Search generative AI” (bản dịch) «Tìm kiếm generative AI» control trong Search Console — an
bao gồm/exclude/inherit setting đó scopes để AI Overviews, AI Chế độ, và
generative AI trong Discover. đây là distinct từ trang-cấp độ nosnippet (mà là một
theo-trang HTML/header rule) và từ Google-Extended (mà governs AI
training và grounding, không Tìm kiếm preview eligibility). Đó rollout là
limited, và theo Google, propagation of một thay đổi có thể take một day hoặc hai, hoặc
lâu hơn. không reach cho điều này as của bạn default — đây là một Search Console setting layered
on top of đó trang-cấp độ controls trên, không một replacement cho them.
Bing và other engines
MỘT parity caveat worth saying out loud: Bing hỗ trợ nosnippet (và đó
snippet-length controls), nhưng Bing làm không document data-nosnippet. Đó
section-cấp độ thuộc tính xuất hiện để là Google-cụ thể. Nếu bạn cần section-cấp độ
snippet control để hold mọi nơi, chỉ Google bảo đảm điều này — không assume Bing
honors một data-nosnippet wrapper.
Apple documents một khác nhau, hữu ích boundary: với nosnippet, Apple có thể vẫn
dùng một trang tiêu đề cho matching và phát hiện, nhưng điều này sẽ không dùng đó trang
nội dung as context cho generative models. Đó là an Apple-cụ thể dùng-control
notice, không một generic claim đó nosnippet xóa đó URL từ phát hiện.
Đó cost bạn là accepting
đây là worth đang honest đó snippet eligibility là một real, losable asset. I
learned đó blunt way với Đó Story of Blocking 2 Cao-Xếp hạng Các trang Với
Robots.txt — khi I blocked hai of của chúng ta xếp hạng các trang trong robots.txt, đó hầu hết
visible casualty đã là đó they lost all of của họ featured snippets. Đó đã là
robots.txt, không nosnippet, nhưng đó lesson transfers: giving lên snippet
eligibility là một deliberate cost. Đó khác biệt là đó nosnippet và
data-nosnippet let bạn cho điều này lên precisely — toàn bộ trang hoặc một section, on
purpose — thay vì as collateral damage từ một crawl block. Spend điều này nơi đây là
worth spending.
AI summary
MỘT condensed take on đó Advanced version:
- Hai controls, hai scopes.
nosnippet= toàn bộ-trang robots directive;data-nosnippet= section-cấp độ HTML thuộc tính. nosnippetgoes trong đó robots meta tag (<meta name="robots" content="nosnippet">) hoặc đóX-Robots-Tag: nosnippetheader (đó header là đó route cho non-HTML như PDFs). Điều này xóa đó text snippet và video preview, xóa featured-snippet eligibility, và — theo Google — drops đó nội dung as một trực tiếp input để AI Overviews và AI Chế độ.nosnippet≈max-snippet:0cho text; on conflict đó hơn restrictive rule wins (nosnippetbeatsmax-snippet:50).data-nosnippetlà hợp lệ chỉ onspan,div,section. đây là một boolean thuộc tính —="true"/="false"/không giá trị all behave đó giống nhau. Đó markup phải là hợp lệ, closed HTML; an unclosed tag bao gồm mọi thứ sau điều này (đó protection fails). không toggle điều này on existing nodes qua JavaScript — set điều này khi một node là đầu tiên đã tạo thay vì. Điều này excludes wrapped text từ cả hai regular và featured snippets, và dữ liệu có cấu trúc bên trong điều này vẫn giữ usable.nosnippetkhông bảo đảm zero visuals — một static image thumbnail có thể vẫn cho thấy “when it results in a better user experience,” (bản dịch) «khi điều này dẫn đến một tốt hơn người dùng experience,» theo Google.- Neither ảnh hưởng lập chỉ mục hoặc thứ hạng — display-chỉ; đó trang vẫn ranks, chỉ không có snippet text.
- AI Overviews removal hoạt động nhưng lags (Gabe/Mueller); toàn bộ-trang
nosnippetcũng strips của bạn thông thường snippet, leaving một bare listing — section-cấp độdata-nosnippetlà gentler. Google là cũng kiểm thử một tách biệt, thuộc tính-cấp độ Tìm kiếm generative AI control trong Search Console (limited rollout) cho AI Overviews/AI Chế độ/Discover, distinct từ trang-cấp độnosnippetvà từGoogle-Extended. - Bing honors
nosnippet;data-nosnippetlà được ghi lại by Google chỉ.
Tài liệu chính thức
Chính-nguồn tài liệu từ đó các công cụ tìm kiếm.
- Robots meta tag, dữ liệu-nosnippet, và X-Robots-Tag các đặc tả — đó definitive spec cho
nosnippet, đódata-nosnippetrules, đó chính thức ví dụ, và đómax-snippet:0sự tương đương. - Featured snippets và của bạn website — cách opt một trang out of featured snippets (
nosnippetlà đó guaranteed phương thức). - Top ways để bảo đảm nội dung của bạn thực hiện well trong Google AI experiences on Tìm kiếm — Tìm kiếm Central blog, Có thể 2025; lists
nosnippet/data-nosnippet/max-snippet/noindexas đó preview controls cho AI experiences. - Tìm kiếm generative AI control — Google Search Console Help; đó newer thuộc tính-cấp độ bao gồm/exclude/inherit setting cho AI Overviews, AI Chế độ, và generative AI trong Discover, tách biệt từ trang-cấp độ
nosnippetvà từGoogle-Extended.
Bing / Microsoft
- Announcing new options cho quản trị viên web để control của họ snippets tại Bing — Bing Quản trị viên web Blog, April 2020; xác nhận Bing hỗ trợ đó
nosnippetmeta tag và đó length controls (max-snippet,max-image-preview,max-video-preview). Note: khôngdata-nosnippet. - Robots meta tags và các thuộc tính đó Bing hỗ trợ — Bing trực tiếp help trang (JS-được kết xuất).
Quotes từ đó nguồn
On-đó-record statements từ Google. Mỗi link là một deep link đó jumps để đó quoted passage on đó trang nguồn.
Google — nosnippet (robots meta tag spec)
- “Do not show a text snippet or video preview in the search results for this page.” (bản dịch) «Không cho thấy một text snippet hoặc video preview trong đó kết quả tìm kiếm cho này trang.» — Google Search Central tài liệu. Nhảy đến trích dẫn
- “This 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.” (bản dịch) «Này áp dụng để all forms of kết quả tìm kiếm (tại Google: web tìm kiếm, Google Images, Discover, AI Overviews, AI Chế độ) và sẽ cũng ngăn đó nội dung từ đang dùng as một trực tiếp input cho AI Overviews và AI Chế độ.» Nhảy đến trích dẫn
- “If you don’t specify this rule, Google may generate a text snippet and video preview based on information found on the page.” (bản dịch) «Nếu bạn không specify này rule, Google có thể generate một text snippet và video preview dựa trên information được tìm thấy on đó trang.» Nhảy đến trích dẫn
- “A static image thumbnail (if available) may still be visible, when it results in a better user experience.” (bản dịch) «MỘT static image thumbnail (nếu khả dụng) có thể vẫn là visible, khi điều này dẫn đến một tốt hơn người dùng experience.» Nhảy đến trích dẫn
Google — data-nosnippet (robots meta tag spec)
- “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-nosnippetHTML attribute onspan,div, andsectionelements.” (bản dịch) «Bạn có thể designate textual parts of an HTML trang không để là dùng as một snippet. Này có thể là đã xong on an HTML-element cấp độ với đódata-nosnippetHTML thuộc tính onspan,div, vàsectionelements.» Nhảy đến trích dẫn - “As with all boolean attributes, any value specified is ignored.” (bản dịch) «As với all boolean các thuộc tính, bất kỳ giá trị specified là đã bỏ qua.» Nhảy đến trích dẫn
- “To ensure machine-readability, the HTML section must be valid HTML and all appropriate tags must be closed accordingly.” (bản dịch) «Để bảo đảm machine-readability, đó HTML section phải được hợp lệ HTML và all appropriate tags phải được closed accordingly.» Nhảy đến trích dẫn
- “To avoid uncertainty from rendering, do not add or remove the
data-nosnippetattribute of existing nodes through JavaScript.” (bản dịch) «Để tránh uncertainty từ kết xuất, không thêm hoặc xóa đódata-nosnippetthuộc tính of existing nodes qua JavaScript.» Nhảy đến trích dẫn - “When adding DOM elements through JavaScript, include the
data-nosnippetattribute as necessary when initially adding the element to the page’s DOM.” (bản dịch) «Khi thêm DOM elements qua JavaScript, bao gồm đódata-nosnippetthuộc tính as necessary khi initially thêm đó element để đó trang DOM.» Nhảy đến trích dẫn - “Structured data remains usable for search results when declared within a
data-nosnippetelement.” (bản dịch) «Dữ liệu có cấu trúc vẫn usable cho kết quả tìm kiếm khi declared trong mộtdata-nosnippetelement.» Nhảy đến trích dẫn
Google — max-snippet sự tương đương & conflict resolution
- “No snippet is to be shown. Equivalent to
nosnippet.” (bản dịch) «Không snippet là để là shown. Tương đương đểnosnippet.» Nhảy đến trích dẫn - “In the case of conflicting robots rules, the more restrictive rule applies. For example, if a page has both
max-snippet:50andnosnippetrules, thenosnippetrule will apply.” (bản dịch) «Trong đó case of conflicting robots rules, đó hơn restrictive rule áp dụng. Ví dụ, nếu một trang có cả haimax-snippet:50vànosnippetrules, đónosnippetrule sẽ apply.» Nhảy đến trích dẫn
Google — featured snippets opt-out
- “If you need a guaranteed solution, use the
nosnippetrule.” (bản dịch) «Nếu bạn cần một guaranteed giải pháp, dùng đónosnippetrule.» — Google, “Featured snippets and your website.” (bản dịch) «Featured snippets và của bạn website.» Nhảy đến trích dẫn
Google — AI tìm kiếm preview controls
- “Make use of
nosnippet,data-nosnippet,max-snippet, ornoindexto set your display preferences. More restrictive permissions will limit how your content is featured in our AI experiences.” (bản dịch) «Làm dùng ofnosnippet,data-nosnippet,max-snippet, hoặcnoindexđể set của bạn display preferences. Hơn restrictive permissions sẽ limit cách nội dung của bạn là featured trong của chúng ta AI experiences.» — Google Search Central Blog, Có thể 2025. Nhảy đến trích dẫn
nosnippet là supported và data-nosnippet không phải
mentioned. Đó Search Console “Search generative AI control” (bản dịch) «Tìm kiếm generative AI control» mô tả trên
là summarized, không quoted verbatim — đó trực tiếp help trang blocked automated
fetching với một bot-kiểm tra trang during này cập nhật truyền; re-verify của nó chính xác
wording trong-trình duyệt trước quoting điều này trực tiếp. Snippet-suppression bảng tra nhanh
nosnippet so với data-nosnippet so với max-snippet:0
| Control | Phạm vi | Nơi điều này goes | Effect |
|---|---|---|---|
nosnippet | Toàn bộ trang | Robots meta tag (content="nosnippet") hoặc X-Robots-Tag: nosnippet header | Không text snippet, không video preview; out of featured snippets; out of AI Overviews/AI Chế độ as một trực tiếp input |
data-nosnippet | Một section | HTML thuộc tính on một span, div, hoặc section element | Hides chỉ đó wrapped text; rest of trang vẫn giữ eligible |
max-snippet:0 | Toàn bộ trang | Robots meta tag (content="max-snippet:0") hoặc header | Giống nhau as nosnippet cho text (0 = “equivalent to nosnippet” (bản dịch) «tương đương để nosnippet») |
Nhanh rules
nosnippet≈max-snippet:0cho text. On conflict, đó hơn restrictive rule wins —nosnippetbeatsmax-snippet:50.data-nosnippetlà boolean:="true",="false", và bare all behave identically (giá trị đã bỏ qua).data-nosnippetrequires hợp lệ, closed HTML — an unclosed tag leaks mọi thứ sau điều này lại vào đó snippet.- không thêm/xóa
data-nosnippeton existing nodes qua JavaScript; set điều này khi một node là đầu tiên đã tạo nếu bạn là building markup dynamically. data-nosnippetcũng excludes wrapped text từ featured snippets; trang-cấp độnosnippettakes priority over điều này khi một trang có cả hai.- Dữ liệu có cấu trúc bên trong một
data-nosnippetelement vẫn giữ usable — đó thuộc tính không hide images, other media, hoặc dữ liệu có cấu trúc, chỉ snippet-eligible text. nosnippetkhông bảo đảm zero visuals — một static image thumbnail có thể vẫn cho thấy khi điều này improves đó kết quả.- PDFs / non-HTML → header chỉ:
X-Robots-Tag: nosnippet. - None of những ảnh hưởng lập chỉ mục hoặc thứ hạng — display chỉ.
- Bing: hỗ trợ
nosnippet+ length controls; không được ghi lạidata-nosnippet. - MỘT newer, tách biệt Search Console “Search generative AI” (bản dịch) «Tìm kiếm generative AI» control (kiểm thử,
limited rollout) scopes để AI Overviews/AI Chế độ/Discover tại đó thuộc tính cấp độ
— distinct từ trang-cấp độ
nosnippetvà từGoogle-Extended.
“Which do I want?” (bản dịch) «Mà làm I muốn?»
- Toàn bộ snippet đã biến mất (và out of featured snippets / AI Overviews) →
nosnippet. - Một paragraph hidden, rest vẫn cho thấy →
data-nosnippet. - Chỉ shorten điều này →
max-snippet:N(đó length control, không những).
Snippet-control mistakes để tránh
- Dùng
nosnippetkhi chỉ một sensitive section cần exclusion. - Expecting
data-nosnippetđể ngăn crawling, lập chỉ mục, hoặc trang access. - Thêm đó thuộc tính để không hợp lệ markup hoặc chỉ sau delayed client kết xuất.
- Blocking đó trang trong robots.txt so các crawler không thể đọc đó directive.
- Suppressing snippets không có accepting đó potential nhấp-qua tradeoff.
- Assuming
data-nosnippethides images, other media, hoặc dữ liệu có cấu trúc on đó trang — điều này chỉ excludes đó wrapped text từ snippet selection. - Assuming
nosnippetbảo đảm zero visuals trong đó listing — một static image thumbnail có thể vẫn cho thấy ngay cả vớinosnippetset.
Phổ biến snippet-control các vấn đề
Text vẫn xuất hiện trong một snippet
Nguyên nhân: data-nosnippet là on đó sai element, không hợp lệ markup, hoặc không khả dụng khi được kết xuất. Cách sửa: inspect đó được kết xuất element và move đó boolean thuộc tính onto hợp lệ div, span, hoặc section markup khoảng đó chính xác text.
Đó entire kết quả loses của nó mô tả
Nguyên nhân: trang-cấp độ nosnippet hoặc tương đương suppression đã là dùng. Cách sửa: xóa điều này và dùng section-cấp độ data-nosnippet nếu chỉ part of đó trang cần exclusion.
MỘT thay đổi không xuất hiện immediately
Nguyên nhân: tìm kiếm output cập nhật sau recrawling và processing. Cách sửa: validate đó trực tiếp markup đầu tiên, thì monitor sau một recrawl thay vì repeatedly thay đổi directives.
Mà snippet control fits?
Choose a snippet-suppression control
Tự kiểm tra
Hoạt động các ví dụ
Suppress đó toàn bộ trang (HTML)
<head>
<meta name="robots" content="nosnippet">
</head>Suppress đó toàn bộ trang (non-HTML, e.g. một PDF)
X-Robots-Tag: nosnippetHide một inline phrase, giữ đó rest
<p>This text can be shown in a snippet
<span data-nosnippet>and this part would not be shown</span>.</p>Hide một toàn bộ block (div hoặc section)
<div data-nosnippet>
Internal pricing notes that shouldn't appear in the search snippet.
</div>
<section data-nosnippet>
<p>An entire region kept out of the snippet.</p>
</section>Boolean — những là all giống hệt (giá trị đã bỏ qua)
<div data-nosnippet>not in snippet</div>
<div data-nosnippet="true">also not in snippet</div>
<div data-nosnippet="false">also not in snippet — value is ignored</div>Đó chế độ lỗi — không bao giờ làm này
<div data-nosnippet>some text</html>
<!-- unclosed "div": everything after it leaks back into the snippet -->Close mỗi data-nosnippet element. Nếu đó markup không hợp lệ, Google không thể đọc
đó boundary và đó protection silently fails.
Thêm điều này dynamically — set điều này tại creation, không sau
// Do this: include the attribute when you first create the node
const el = document.createElement('div');
el.setAttribute('data-nosnippet', '');
document.body.appendChild(el);
// Don't do this: add/remove it on a node that's already in the DOM
existingEl.setAttribute('data-nosnippet', ''); // rendering uncertainty Nhật ký thay đổi
Đã cập nhật 8 thg 8, 2026.
Tóm tắt biên tập và chi tiết thay đổi đã ghi nhận.Chi tiết thay đổi
-
Ghi chú thay đổi chi tiết hiện chỉ có bằng tiếng Anh.
Không thể so sánh đầy đủ — không có bản lưu trước đó cho lần sửa đổi này.
Đã cập nhật 19 thg 7, 2026.
Tóm tắt biên tập và chi tiết thay đổi đã ghi nhận.Chi tiết thay đổi
-
Ghi chú thay đổi chi tiết hiện chỉ có bằng tiếng Anh.
Không thể so sánh đầy đủ — không có bản lưu trước đó cho lần sửa đổi này.
Đã cập nhật 18 thg 7, 2026.
Tóm tắt biên tập và chi tiết thay đổi đã ghi nhận.Chi tiết thay đổi
-
Ghi chú thay đổi chi tiết hiện chỉ có bằng tiếng Anh.
-
Ghi chú thay đổi chi tiết hiện chỉ có bằng tiếng Anh.
-
Ghi chú thay đổi chi tiết hiện chỉ có bằng tiếng Anh.
-
Ghi chú thay đổi chi tiết hiện chỉ có bằng tiếng Anh.
Không thể so sánh đầy đủ — không có bản lưu trước đó cho lần sửa đổi này.