Hướng dẫn về Meta Robots Tag

Đó robots meta tag controls cách một trang là được lập chỉ mục và phân phối — mỗi directive, đó crawl-thì-obey rule, conflict resolution, và meta tag so với X-Robots-Tag.

Xuất bản lần đầu: 23 thg 6, 2026 · Cập nhật lần cuối: 8 thg 8, 2026 · Advanced
Ngôn ngữ
1 tín hiệu bằng chứng trên trang này

Đó robots meta tag — <meta name="robots" content="noindex"> trong đó <head> — tells các công cụ tìm kiếm cách chỉ mục và serve một single trang. Đó rule đó breaks mọi thứ: đây là crawl-thì-obey, so một trang blocked trong robots.txt là không bao giờ fetched và của nó noindex là không bao giờ seen. Với không tag, đó default là chỉ mục, follow. Conflicting rules resolve để đó hầu hết restrictive; cho một googlebot-named tag so với đó generic robots tag, Googlebot takes đó sum of đó negative rules. Đó tag là HTML-chỉ — dùng đó X-Robots-Tag header cho PDFs, images, và other non-HTML.

TL;DR — <meta name="robots" content="…"> trong đó <head> controls cách một single trang là được lập chỉ mục và phân phối; với không tag đó default là index, follow. đây là crawl-thì-obey: “these settings can be read and followed only if crawlers are allowed to access the pages” (bản dịch) «những settings có thể là đọc và followed chỉ nếu các crawler là được phép để access đó các trang» — so một robots.txt-blocked URL là không bao giờ fetched và của nó noindex là không bao giờ seen (I có đầu tiên-party dữ liệu on đó flip side of này). Conflicting rules resolve để đó hầu hết restrictive; trên một googlebot tag và đó generic robots tag, Googlebot takes đó sum of đó negative rules. Đó tag là HTML-chỉ — dùng đó X-Robots-Tag header cho non-HTML và tại quy mô. Google đọc chỉ hai crawler-named tokens — googlebotgooglebot-news — và bỏ qua mỗi other giá trị, including other engines’ tokens như bingbot.

Evidence for this claim Google can read and follow page-level robots rules only when it is allowed to access the page. Scope: Google-supported robots meta and X-Robots-Tag rules; robots.txt blocking can prevent rule discovery. Confidence: high · Verified: Google Search Central: Robots meta tag specifications

Điều gì nó là, nơi nó goes, và default

Đó robots meta tag cho phép bạn, trong Google words, “use a granular, page-specific approach to controlling how an individual HTML page should be indexed and served to users in Google Search results.” (bản dịch) «dùng một granular, trang-cụ thể approach để controlling cách an riêng lẻ HTML trang nên là được lập chỉ mục và phân phối để người dùng trong Google Search kết quả.» Đó conventional, portable place cho điều này là đó <head>:

<meta name="robots" content="noindex, nofollow">

Head placement là đó authoring convention mỗi engine expects, nhưng Google là rõ ràng đó điều này không một hard requirement cho Google Search cụ thể: “Google Search doesn’t enforce placement of meta robots in the HTML head and will respect robots meta tags in the body section of an HTML document as well.” (bản dịch) «Google Search không enforce placement of meta robots trong đó HTML head và sẽ respect robots meta tags trong đó thân phản hồi section of an HTML document as well.» Treat đó as tolerance cho Google, không portable advice — vẫn tác giả điều này trong đó <head> so mỗi crawler và validator đó expects tiêu chuẩn placement đọc điều này correctly.

Đó name thuộc tính là đó audience, và này là nơi hầu hết các hướng dẫn overstate Google hỗ trợ. name="robots" addresses mỗi crawler đó đọc đó tag. Beyond đó, Google hỗ trợ chính xác hai crawler-named tokens, và bỏ qua mỗi other giá trị: “Google supports two user agent tokens in the robots meta tag; other values are ignored: googlebot for all text results, and googlebot-news for news results.” (bản dịch) «Google hỗ trợ hai người dùng agent tokens trong đó robots meta tag; other các giá trị là đã bỏ qua: googlebot cho all text kết quả, và googlebot-news cho news kết quả.» MỘT tag named name="bingbot" không một được ghi lại Google control — Bing đọc của nó own token on của nó own terms, nhưng Google skips bất kỳ name giá trị điều này không recognize. Cả hai đó namecontent các thuộc tính là case-insensitive để Google, và so là X-Robots-Tag header names và các giá trị.

Khi không robots meta tag là present, đó default là index, follow (đó all rule, mà Google notes “has no effect if explicitly listed” (bản dịch) «có không effect nếu explicitly listed»). Evidence for this claim For Google, the default robots meta behavior is index, follow when no restrictive rule is present. Scope: Google-supported robots meta rules; other crawlers publish their own support and defaults. Confidence: high · Verified: Google Search Central: Robots meta tag specifications Bạn chỉ cần đó tag để thay đổi đó default.

Bạn combine rules hai ways: comma-separated trong một tag (noindex, nofollow) hoặc as multiple <meta> tags. Google: bạn có thể “create a multi-rule instruction by combining robots meta tag rules with commas or by using multiple meta tags.” (bản dịch) «tạo một multi-rule instruction by combining robots meta tag rules với commas hoặc by dùng multiple meta tags.»

rule đó breaks mọi thứ: Google phải crawl trang để see tag

Đây là toàn bộ bài viết. robots meta tag là crawl-sau đó-obey. Google có để fetch trang để đọc tag — so bất cứ điều gì đó dừng fetch dừng tag từ bao giờ là applied. Straight từ spec:

“Keep in mind that these settings can be read and followed only if crawlers are allowed to access the pages that include these settings.” (bản dịch) «Hãy nhớ rằng đó những settings có thể là đọc và followed chỉ nếu các crawler là được phép để access đó các trang đó bao gồm những settings.»

Evidence for this claim Google can read and follow page-level robots rules only when it is allowed to access the page. Scope: Google-supported robots meta and X-Robots-Tag rules; robots.txt blocking can prevent rule discovery. Confidence: high · Verified: Google Search Central: Robots meta tag specifications

và consequence, spelled out:

“If a page is disallowed from crawling through the robots.txt file, then any information about indexing or serving rules will not be found and will therefore be ignored.” (bản dịch) «Nếu một trang là disallowed từ crawling qua đó robots.txt file, thì bất kỳ information về lập chỉ mục hoặc serving rules sẽ không là được tìm thấy và sẽ do đó là đã bỏ qua.»

So đó classic mistake — Disallow trong robots.txt plus noindex on đó giống nhau URL — silently defeats đó noindex. Google không bao giờ crawl đó trang, không bao giờ sees đó tag, và đó URL có thể linger trong đó chỉ mục (thường as một bare, snippet-ít hơn kết quả nếu điều gì đó links để điều này). Google companion “Block Search Indexing” (bản dịch) «Block Tìm kiếm Lập chỉ mục» doc says cùng một điều trong plainer language: cho đó noindex rule để hoạt động, đó trang “must not be blocked by a robots.txt file… If the page is blocked by a robots.txt file or the crawler can’t access the page, the crawler will never see the noindex rule, and the page can still appear in search results.” (bản dịch) «không được là blocked by một robots.txt file… Nếu đó trang là blocked by một robots.txt file hoặc đó crawler không thể access đó trang, đó crawler sẽ không bao giờ see đó noindex rule, và đó trang có thể vẫn xuất hiện trong kết quả tìm kiếm.»

I’ve watched đó flip side of này mechanism happen với real dữ liệu. Trong my thử nghiệm Đó Story of Blocking 2 Cao-Xếp hạng Các trang Với Robots.txt, I có chủ ý blocked hai of của chúng ta xếp hạng các trang trong robots.txt. Vì Google có thể không lâu hơn crawl them, điều này không thể refresh bất cứ điều gì về them — và đó các trang mostly kept xếp hạng: “We lost a position here or there and all of the featured snippets for the pages.” (bản dịch) «We lost một position ở đây hoặc ở đó và all of đó featured snippets cho đó các trang.» My takeaway: “Accidentally blocking pages (that Google already ranks) from being crawled using robots.txt probably isn’t going to have much impact on your rankings, and they will likely still show in the search results.” (bản dịch) «Accidentally blocking các trang (đó Google đã ranks) từ đang được crawl dùng robots.txt probably không going để có nhiều impact on của bạn thứ hạng, và they sẽ có khả năng vẫn cho thấy trong đó kết quả tìm kiếm.» đó là đó giống nhau coin as đó noindex vấn đề — một blocked URL là frozen. Block ≠ xóa. Nếu bạn thực ra muốn một trang đã biến mất, bạn cần một crawlable noindex, mà là đó entire point of này tag.

Này là đó line I’ve drawn publicly on nơi mỗi tool belongs. Asked liệu Google nên thêm noindex hỗ trợ để robots.txt, I đã nói: “Google was clear they want robots.txt for crawl control only.” (bản dịch) «Google đã là clear they muốn robots.txt cho crawl control chỉ.» Crawling là robots.txt job; lập chỉ mục là đó meta tag (hoặc đó header). They không overlap, và đó noindex directive trong robots.txt đã là không bao giờ officially supported — Google dropped phân tích cú pháp of điều này on September 1, 2019.

mỗi robots meta directive ( reference)

Google supported các giá trị, với verbatim các mô tả từ spec:

lập chỉ mục

  • all“There are no restrictions for indexing or serving. This rule is the default value and has no effect if explicitly listed.” (bản dịch) «Có không restrictions cho lập chỉ mục hoặc serving. Này rule là đó default giá trị và có không effect nếu explicitly listed.»
  • noindex“Do not show this page, media, or resource in search results.” (bản dịch) «Không cho thấy này trang, media, hoặc tài nguyên trong kết quả tìm kiếm.»
  • none“Equivalent to noindex, nofollow.” (bản dịch) «Tương đương để noindex, nofollow
  • indexifembedded“Google is allowed to index the content of a page if it’s embedded in another page through iframes or similar HTML tags, in spite of a noindex rule.” (bản dịch) «Google là được phép để chỉ mục đó nội dung of một trang nếu đây là embedded trong một sản phẩm khác trang qua iframes hoặc similar HTML tags, trong spite of một noindex rule.» (Đó một directive đó overrides một noindex, cho embedded nội dung.)

Links

  • nofollow“Do not follow the links on this page.” (bản dịch) «Không follow đó links on này trang.» Này là trang-cấp độ — khác nhau phạm vi từ một theo-link rel="nofollow", mà áp dụng để một link.

Serving và snippets

  • nosnippet“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.» Này phạm vi là rộng hơn đó classic text snippet: Google says đ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ế độ.»
  • max-snippet:[number]“Use a maximum of [number] characters as a textual snippet for this search result.” (bản dịch) «Dùng một maximum of [number] characters as một textual snippet cho này tìm kiếm kết quả.» Giống nhau broadened phạm vi as nosnippet: điều này “applies to all forms of search results (such as Google web search, Google Images, Discover, Assistant, AI Overviews, AI Mode) and will also limit how much of the content may be 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 (such as Google web tìm kiếm, Google Images, Discover, Assistant, AI Overviews, AI Chế độ) và sẽ cũng limit cách nhiều of đó nội dung có thể là dùng as một trực tiếp input cho AI Overviews và AI Chế độ.» đó là một trực tiếp-input eligibility control cho Google own AI tìm kiếm features — điều này không phải một chung AI-training opt-out. Giữ nội dung của bạn out of model training (e.g. Google-Extended) hoặc out of Tìm kiếm tách biệt generative-AI thuộc tính-cấp độ control trong Search Console là khác nhau các hệ thống với khác nhau scopes; không treat nosnippet/max-snippet as covering either.
  • max-image-preview:[setting]“Set the maximum size of an image preview for this page in search results.” (bản dịch) «Set đó maximum size of an image preview cho này trang trong kết quả tìm kiếm.» Settings: none, standard, hoặc large (“A larger image preview, up to the width of the viewport, may be shown.” (bản dịch) «MỘT lớn hơn image preview, lên để đó width of đó viewport, có thể là shown.»).
  • max-video-preview:[number]“Use a maximum of [number] seconds as a video snippet for videos on this page in search results.” (bản dịch) «Dùng một maximum of [number] seconds as một video snippet cho videos on này trang trong kết quả tìm kiếm.»
  • notranslate“Don’t offer translation of this page in search results.” (bản dịch) «không offer translation of này trang trong kết quả tìm kiếm.»
  • noimageindex“Do not index images on this page.” (bản dịch) «Không chỉ mục images on này trang.»
  • unavailable_after:[date/time]“Do not show this page in search results after the specified date/time.” (bản dịch) «Không cho thấy này trang trong kết quả tìm kiếm sau đó specified date/time.»

Lịch sử — không lâu hơn active Google controls

một vài directives đó vẫn circulate trong older các hướng dẫn là ones Google nói nó không lâu hơn dùng. không thêm những điều này expecting them để làm bất cứ điều gì:

  • noarchive“The noarchive rule is no longer used by Google Search to control whether a cached link is shown in search results, as the cached link feature no longer exists.” (bản dịch) «Đó noarchive rule là không lâu hơn dùng by Google Search để control liệu một được lưu đệm link là shown trong kết quả tìm kiếm, as đó được lưu đệm link feature không lâu hơn tồn tại.»
  • nocache (một synonym some engines dùng cho noarchive) — “The nocache rule isn’t used by Google Search.” (bản dịch) «Đó nocache rule không dùng by Google Search.»
  • nositelinkssearchbox“The nositelinkssearchbox rule is no longer used by Google Search to control whether the sitelink search box is shown for a given page, as the feature no longer exists.” (bản dịch) «Đó nositelinkssearchbox rule là không lâu hơn dùng by Google Search để control liệu đó sitelink tìm kiếm box là shown cho một được cho trang, as đó feature không lâu hơn tồn tại.»

Paragraph-cấp độ (không trong meta tag)

có một sub-trang control: đó data-nosnippet thuộc tính. Google: bạn có thể “designate textual parts of an HTML page not to be used as a snippet… on span, div, and section elements.” (bản dịch) «designate textual parts of an HTML trang không để là dùng as một snippet… on span, div, và section elements.» Mọi thứ trong đó meta tag là trang-wide; nosnippet / dữ liệu-nosnippet là cách bạn giữ một passage out of đó snippet không có touching đó rest.

Combining directives và resolving conflicts

Hai rules govern Điều gì happens Khi directives collide.

1. Đó hơn restrictive rule wins. “In the case of conflicting robots rules, the more restrictive rule applies. For example, if a page has both max-snippet:50 and nosnippet rules, the nosnippet rule 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ả hai max-snippet:50nosnippet rules, đó nosnippet rule sẽ apply.» nosnippet là stricter hơn một 50-character cap, so nosnippet là điều gì bạn nhận.

2. googlebot so với robots — đó sum of đó negative rules. Này là đó một hầu hết các hướng dẫn nhận sai. MỘT googlebot-named tag làm không đơn giản replace đó generic robots tag — cho đó overlap, Googlebot takes đó union of đó restrictions. Google: “For situations where multiple crawlers are specified along with different rules, the search engine will use the sum of the negative rules.” (bản dịch) «Cho situations nơi multiple các crawler là specified along với khác nhau rules, đó công cụ tìm kiếm sẽ dùng đó sum of đó negative rules.» Của họ worked ví dụ:

<meta name="robots" content="nofollow">
<meta name="googlebot" content="noindex">

“The page containing these meta tags will be interpreted as having a noindex, nofollow rule when crawled by Googlebot.” (bản dịch) «Đó trang containing những meta tags sẽ là interpreted as có một noindex, nofollow rule khi được crawl by Googlebot.» Đó nofollow từ robots plus đó noindex từ googlebot thêm lên để noindex, nofollow cho Googlebot. (Nơi một googlebot tag và một robots tag set đó giống nhau directive differently, đó crawler-named một là đó một đó áp dụng để đó crawler.)

Meta robots tag so với X-Robots-Tag ( HTTP header)

Đó robots meta tag là HTML-chỉ — điều này cần một <head>. Cho bất cứ điều gì đó không HTML, bạn dùng đó X-Robots-Tag, mà delivers đó chính xác giống nhau rule vocabulary trong đó HTTP header phản hồi. Google: “The X-Robots-Tag can be used as an element of the HTTP header response for a given URL. Any rule that can be used in a robots meta tag can also be specified as an X-Robots-Tag.” (bản dịch) «Đó X-Robots-Tag có thể là dùng as an element of đó HTTP header phản hồi cho một được cho URL. Bất kỳ rule đó có thể là dùng trong một robots meta tag có thể cũng là specified as an X-Robots-Tag Và đó reason điều này tồn tại: “You can use the X-Robots-Tag for non-HTML files like image files where the usage of robots meta tags in HTML is not possible.” (bản dịch) «Bạn có thể dùng đó X-Robots-Tag cho non-HTML files như image files nơi đó usage of robots meta tags trong HTML không phải có thể.»

So:

  • PDF, image, hoặc khác non-HTML? Bạn có thể’t thêm <meta> tag — sử dụng header, e.g. X-Robots-Tag: noindex.
  • Toàn bộ directories hoặc patterns? header là đặt tại máy chủ/CDN cấp độ, so nó scales để đểàn bộ paths trong một config rule.
  • Một engine? header có thể đích crawler cũng: X-Robots-Tag: googlebot: noindex, nofollow, và multiple X-Robots-Tag các header có thể là combined trong một phản hồi.

giống nhau rules, hai phân phối mechanisms: meta tag cho HTML các trang, header cho mọi thứ khác và cho quy mô.

Mà directives Bing và khác engines hỗ trợ

không assume directive đặt là universal — nó không phải. Bing hỗ trợ cốt lõi lập chỉ mục và serving rules — noindex, nofollow, noarchive (với nocache as của nó synonym), và nosnippet — và nó honors X-Robots-Tag cho non-HTML các tài nguyên. nhưng Bing làm không hỗ trợ none shorthand, so cho cross-engine safety, ghi noindex, nofollow out explicitly thay vì relying on none. snippet- và preview-control family — max-snippet, max-image-preview, max-video-preview — along với noimageindex, notranslate, indexifembedded, và unavailable_after, là effectively Google-chỉ. Khi trong doubt, spell directives out và treat max-* controls as Google features.

phổ biến mistakes (và các cách sửa)

  • Disallow + noindex on đó giống nhau URL. Đó noindex là không bao giờ seen. Cách sửa: leave đó trang crawlable; giữ chỉ đó noindex.
  • noindex plus một rel=canonical pointing elsewhere. Conflicting các tín hiệu — bạn là telling Google cả hai “drop this page” (bản dịch) «drop này trang» và “consolidate it into another one.” (bản dịch) «consolidate điều này vào một sản phẩm khác một.» Pick một. (Hơn trong canonicalization.)
  • MỘT staging-wide noindex shipped để production. Catastrophic, sitewide deindex. Kiểm tra trước launch.
  • MỘT noindex injected chỉ by client-side JavaScript. Google có để render đó trang để see điều này, và nếu đó được kết xuất HTML differs từ điều gì bạn expect, behavior differs cũng. Ưu tiên đó tag trong đó thô HTML hoặc đó header. (See kết xuất.)
  • Expecting Bing để honor Google-chỉ directives (none, đó max-* family).
  • Expecting một robots directive để làm một job điều này không own. MỘT noindex hoặc nosnippet rule không by itself bảo đảm crawl-budget savings, secrecy, một xếp hạng thay đổi, giống hệt behavior trên các công cụ tìm kiếm, một cụ thể removal timeline, hoặc exclusion từ mỗi AI/tìm kiếm surface — mỗi of những outcomes belongs để một khác nhau control (authentication cho secrecy, robots.txt cho crawl, mỗi engine own tài liệu cho parity, Search Console hoặc Google-Extended cho AI-cụ thể scopes). Google cho không fixed timeframe cho khi một noindexed trang thực ra drops out — điều này phụ thuộc vào recrawl priority và “may take months” (bản dịch) «có thể take months» cho một thấp hơn-importance trang.

cho nơi điều này sits trong bigger picture: robots.txtcrawling là crawl-control side; noindexlập chỉ mục là chỉ mục-control side; và nosnippet / dữ liệu-nosnippet, max-snippet, và max-image-preview là serving controls bạn reach cho Khi bạn muốn trang được lập chỉ mục nhưng muốn để shape Cách nó xuất hiện. X-Robots-Tag là điều này giống nhau tag HTTP-header tương đương cho non-HTML.

Add an expert note

Pin an expert quote

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