NeovaNền tảng SEO chuyên sâu

Thẻ meta robots nằm ngoài head

Trong Neova Chạy ngay từ lần crawl: không cần thiết lập gì.

Quy tắc được rà soát lần cuối ngày 17 tháng 10 năm 2026 · Hướng dẫn cập nhật ngày 17 tháng 10 năm 2026

Google vẫn tuân theo thẻ meta robots nằm ngoài head, nhưng vị trí đó thường có nghĩa là có thứ đã làm hỏng head. Điều này quan trọng nhất khi thẻ mang noindex hoặc nofollow ngoài ý muốn.

Bạn có thể làm gì

Di chuyển thẻ vào head và tìm phần tử đã kết thúc head quá sớm. Xóa noindex hoặc nofollow nếu chúng không có chủ ý.

Vì sao Neova đánh dấu

  • Google vẫn tuân theo thẻ meta robots nằm ngoài head, nên một noindex ngoài ý muốn ở đó vẫn có thể gỡ URL khỏi kết quả.
  • Thẻ robots rơi vào body thường nghĩa là một phần tử đã đóng head quá sớm, có thể đẩy cả title hay canonical ra ngoài.
  • Hướng dẫn metadata của Google nói họ đọc metadata từ một head hợp lệ, nên chỗ an toàn cho mọi thẻ robots là bên trong head.

Nguồn

Hướng dẫn đầy đủ

Phần này tạm thời còn bằng tiếng Anh.

AI Summary

The robots meta tag must live inside the HTML <head>. When a crawler finds it in the <body>, it usually treats it as page content rather than a directive, so a noindex or nofollow placed there can be silently ignored. The fix is to move the tag back into the head and re-crawl to confirm.

  • A robots meta tag in the body may be ignored, so an intended noindex can fail and the page stays indexed.
  • The most common cause is a malformed or unclosed tag in the head that pushes later meta tags into the body.
  • Page builders and scripts that inject tags after load can also drop a robots meta into the body.
  • Detect with View Source or Screaming Frog, move the tag into the head, then re-crawl to verify.
Code diagram showing a robots meta tag inside the HTML head marked honored and an identical tag inside the body marked ignored, with a three step fix to move it into the head.
A robots meta tag is honored inside the head and ignored inside the body. The fix is to move the stray tag back into the head and re-crawl.

Quick Reference

Element Code: HT-006

Issue: Meta robots tag is placed outside the head section

Impact: Meta robots directive may be ignored by search engines

Fix: Move meta robots tag into the head section

Detection: Screaming Frog, HTML validation, View Source

What Is This Issue?

Meta tags must be placed in the head section of HTML documents. A meta robots tag in the body may be ignored by search engines, causing your indexing directives to fail.

The robots meta tag tells crawlers what to do after they fetch a page: whether to index it, follow its links, show a snippet, and so on. The HTML specification defines the tag as document metadata, which belongs in <head>. When a parser encounters it inside <body>, it is out of place. Google’s own documentation now says (note added March 24, 2026) that Google respects a robots meta tag in the body as well, but other parsers often drop a body-level directive, so with those engines a page you meant to keep out of the index can quietly stay in it.

Why This Matters for Your Website

Robots directives control whether pages are indexed. If they are ignored due to incorrect placement, you may have pages indexed that should not be, or vice versa.

The failure mode is dangerous precisely because it is invisible. The tag is present, it looks correct, and a quick glance at the source suggests everything is fine. Only when you check where the tag actually sits, or notice a supposedly noindexed URL appearing in Search Console, does the problem surface. A staging page, a thank-you page, or a thin filter URL that should have been suppressed can leak into search results and dilute your site quality signals.

Common Causes of a Body-Level Robots Tag

Understanding how the tag ends up in the body makes it far quicker to fix. The usual culprits:

  • An unclosed or malformed tag in the head. A stray </head>, an unterminated attribute, or an unescaped character can make the browser close the head early, so every meta tag after it lands in the body.
  • Page builders and plugins that inject their own tags into the content area rather than the document head.
  • JavaScript that adds the tag after load, appending it to the body or a container element instead of the head.
  • Content pasted into a WYSIWYG editor, where a copied meta tag becomes part of the post body.

How to Fix This Issue

  1. Locate the meta robots tag: Find it in your HTML source
  2. Move to head: Ensure it is between <head> and </head>
  3. Verify: Re-crawl and check placement

A correct implementation looks like this, with the directive sitting cleanly inside the head:

<head>
<meta charset="utf-8">
<meta name="robots" content="noindex, follow">
</head>

If the tag is being written by a plugin or theme, fix it at the source rather than patching the output: correct the SEO plugin setting, or update the template so the tag is printed inside wp_head() on WordPress. When a broken tag earlier in the head is closing it prematurely, repairing that tag is what actually moves the robots meta back into place.

Tools for Detection

  • Screaming Frog: Shows meta robots location issues
  • HTML Validator: Flags misplaced meta tags

In Screaming Frog, crawl the site and check the Directives tab, then use View Source or the browser Inspector on a suspect URL to confirm whether the tag renders inside the head or the body. The W3C validator will also flag metadata that appears outside the head, which often points straight at the malformed tag responsible.

Placement, Behavior, and Fix at a Glance

Where the Tag Sits How Crawlers Treat It Result Action
Inside the head Read as a directive noindex or nofollow honored Correct, no change needed
Inside the body Treated as content Directive may be ignored Move into the head
Injected by JS after load May be missed on render Unreliable Output server side in the head
After a broken head tag Head closed early Tag spills into body Fix the malformed tag first

TL;DR (The Simple Version)

Your meta robots tag is in the wrong place. It needs to be inside the head section, not in the body. Move it and re-check.

Frequently Asked Questions

Does a meta robots tag in the body still work?

In Google, yes: its robots meta tag documentation (note added March 24, 2026) says Google respects robots meta tags in the body too. Other parsers tend to treat a body-level tag as content rather than a directive, so a noindex placed there can be silently ignored elsewhere; keep it in the head.

Why did my noindex tag end up in the body?

The most common reason is a malformed or unclosed tag earlier in the head, which makes the browser close the head early so later meta tags fall into the body. Plugins, page builders, and JavaScript that inject tags after load can also cause it.

How do I check where my robots tag is?

Open View Source or the browser Inspector on the page and look for the meta robots tag. Confirm it appears between the opening and closing head tags. Screaming Frog also reports directive placement across a whole crawl.

Will Google index a page whose noindex is in the body?

It should not: Google says it respects a robots meta tag in the body (note added March 24, 2026). Other engines may ignore it, so still move it into the head, then verify in Search Console that the URL is actually excluded.

What is the correct place for the robots meta tag?

Inside the document head, alongside the other meta tags, for example between the opening head tag and the closing head tag. On WordPress it should be printed by the SEO plugin inside wp_head().

How do I confirm the fix worked?

Re-crawl the URL and check that the robots tag now renders inside the head, then use the URL Inspection tool in Search Console to confirm the directive is being read as intended.

Related reading on Neova:

  • Full meta robots and X-Robots-Tag reference
  • More HTML structure SEO checks
  • Browse all indexing and crawl guides

Tìm lỗi này trên trang của bạn

Neova chạy mục kiểm tra này và mọi mục khác trong mỗi lần crawl, rồi viết cách sửa thành ticket cho nhóm của bạn.

  • Ứng dụng máy tính cho Mac, Windows và Linux
  • Tất cả 696 mục kiểm tra, mỗi mục kèm nguồn
  • Search Console và Analytics 4, kết nối chỉ đọc
  • Ticket sang Jira, Linear và Asana

Tải Neova Gói Desktop Free, hoặc dùng thử Solo miễn phí 14 ngày, không cần thẻ.

Tất cả mục kiểm tra Khả năng lập chỉ mục · Hướng dẫn · Thư viện mục kiểm tra

Do Neova Labs biên soạn · Quay lại Thư viện mục kiểm tra