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

Có nhiều thẻ body

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 1 tháng 7 năm 2026

Chuẩn HTML định nghĩa một phần tử body duy nhất, và trình phân tích gộp các thẻ body thừa. Không công cụ tìm kiếm nào đặt quy tắc cho điều này, nên đây là HTML không hợp lệ cần dọn dẹp.

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

Xóa các thẻ mở body thừa, thường đến từ một file include hoặc một widget.

Vì sao Neova đánh dấu

  • Tiêu chuẩn HTML định nghĩa một phần tử body duy nhất, nên thẻ mở body thứ hai là HTML không hợp lệ.
  • Trình duyệt âm thầm gộp các thẻ thừa, nên trang thường trông ổn, nhưng nó cho thấy một include hoặc widget đang in khung trang riêng.
  • Không công cụ tìm kiếm nào đặt quy tắc cho việc này; đây là việc dọn dẹp.

Nguồn

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

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

TL;DR: An HTML page is only allowed one <body> element. When a template or plugin outputs two or more, browsers and Googlebot quietly merge them into a single body, but the malformed markup can break rendering, drop content, and hint at deeper template problems. Every page should ship exactly one body tag.
Category
Indexation

Valid count
Exactly one

Usual cause
Template or plugin

Detect with
Validator, Frog

Severity
Medium

One Body per Page, No Exceptions

The HTML spec is blunt about this. A document has one <html>, one <head>, and one <body>. The body holds everything the user sees. There is no valid scenario where a single page needs two body elements. So when a crawler reports Multiple Body Tags, it found a page that emitted <body> two or more times, and that page is malformed.

Browsers are forgiving, which is exactly why this bug survives. When a parser meets a second <body>, it does not throw an error and stop. It follows the HTML parsing rules, ignores the extra body start tag, and folds any attributes and content into the one body it already has. Googlebot uses the same parsing model. So the page usually still renders and still indexes. That leniency is a trap: the issue hides because nothing visibly explodes, while the underlying markup is broken and can misbehave in ways that are hard to reproduce.

How the Parser Handles It

Source HTML (broken) <body> header, main content </body> <body> <!-- second --> footer widget </body>

parser

Parsed DOM (merged) <body> header, main content footer widget </body> second body dropped, content folded in

It usually works, until an attribute or script on the wrong body silently gets ignored.

Why It Matters for SEO and Rendering

Most of the time nothing dramatic happens, and that is precisely why people wave it off. But there are real failure modes worth taking seriously.

Attributes on the ignored body are lost. If your analytics, tag manager, or a framework hook lives as an attribute on the second <body>, the parser drops it, and that tracking or behavior silently fails. Content placement can shift, because the parser puts the merged content wherever its rules dictate, not necessarily where you intended, which can push key content out of the spot you optimized. JavaScript that targets the body by structure can break when the DOM does not match the source. And when Google renders the page, a malformed body raises the odds that some content is not captured cleanly, which is a bad bet on a page you want fully indexed.

The bigger point: a duplicate body is a symptom. It means a template is being included twice, a plugin is injecting a full document into another, or a partial got nested wrong. Whatever caused two bodies is probably causing other malformed output too. Fixing it usually fixes a class of problems.

Common Causes

Cause What Is Happening Where to Look
Template included twice Header or full layout partial rendered two times Theme header and footer files
Plugin injects a full page Add-on outputs its own html and body inside yours Recently added plugins, disable to test
Page builder conflict Builder wraps content in its own document shell Builder templates and global sections
Hardcoded body in content An editor pasted a full HTML snippet into a post Post and page body content, custom HTML blocks
Server-side include error An include pulls in a whole document, not a fragment Include and require statements

How to Detect It

  • W3C Nu HTML Checker: paste the URL and it reports "Stray start tag body" or "Cannot have more than one body". This is the definitive check.
  • Screaming Frog: use a custom extraction or custom search to count <body occurrences per page. More than one flags the URL. Run it site-wide to see whether it is one page or a template affecting everything.
  • View source and search: open the raw HTML, not the rendered DOM, and search for <body. The rendered DevTools tree will show one merged body, so you must check the source that the server sent.
  • Sitebulb: its HTML validation hints surface structural errors including duplicate document elements.
  • curl the URL: curl -s URL | grep -o "<body" | wc -l gives you a fast count straight from the server response.

How to Fix It, Step by Step

  1. Confirm it is in the source, not the DOM. Pull the raw response with curl or view-source and count the body tags. Rendered DevTools always shows one, so it will mislead you here.
  2. Decide: template or content. If every page has two bodies, it is a template or plugin. If only one page does, someone pasted full HTML into that page's content.
  3. For content, strip the extra shell. Edit the post, switch to the HTML or code view, and delete the pasted <html>, <head>, and <body> wrapper, keeping only the inner content.
  4. For templates, find the double include. Trace which partial outputs the body tag and make sure it runs once. A layout file should open body exactly one time and a footer should close it once.
  5. For plugins, isolate by disabling. Turn off suspect plugins one at a time and re-check the source. When the second body disappears, you have your culprit.
  6. Move body attributes to the surviving tag. If the second body carried classes, IDs, or event attributes you rely on, put them on the one real body so nothing is lost.
  7. Re-validate. Run the Nu checker again and confirm a clean parse, then re-crawl to make sure the fix held across the whole template.
DO
  • Validate the raw source, not the rendered DOM
  • Ship exactly one body per document
  • Keep only inner content when pasting HTML
  • Isolate offending plugins by disabling them
  • Move needed attributes onto the single body
DON'T
  • Shrug it off because the page still renders
  • Trust DevTools, it hides the merged body
  • Paste full HTML documents into post content
  • Nest one template's document inside another
  • Leave tracking attributes on the dropped body

What Good Looks Like

A clean page validates with zero structural errors: one <html>, one <head>, one <body>. A site-wide crawl counting body tags returns exactly one per URL. All your body-level attributes, analytics hooks, classes, and framework bindings, sit on that single body, so nothing gets silently dropped. When you clean this up you usually find you have also fixed whatever template or plugin was doubling output, which is worth more than the one validation flag on its own.

FAQ

Will Two Body Tags Stop My Page From Indexing?
Usually not, because Googlebot merges them like a browser does. But it raises the risk of content or attributes being dropped during rendering, so it is worth fixing rather than gambling on a clean merge every time.
Why Does DevTools Only Show One Body?
DevTools shows the parsed DOM, which is already merged into a single valid body. To see the real problem you have to inspect the raw HTML the server sends, using view-source or curl.
Is One Page Affected or My Whole Site?
Count body tags across a crawl. If it is one URL, someone pasted a full HTML document into that page. If it is every URL, a template or plugin is doubling the body and the fix applies site-wide.
Can Two Head Tags Cause the Same Trouble?
Yes, duplicate head elements are the same class of error and often show up alongside duplicate bodies from the same doubled template. Fix the root cause and both tend to resolve together.
Malformed markup hiding across your templates?

Duplicate body tags are rarely alone. An audit validates your markup site-wide, traces the doubled template or plugin, and gives you a clean fix list.

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 Nội dung · 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