Multiple Head Tags

No Comments
Multiple head tags
TL;DR: A valid HTML page has exactly one <head> element. When a template bug, a plugin, or a bad injection produces two or more, browsers and Googlebot silently merge or truncate them, and tags you care about (canonical, title, robots meta) can land in the wrong place or get dropped. Find the duplicate, kill it at the source, and validate.
Check type
Indexation / HTML
Severity
Medium
Valid count
Exactly one
Detect with
Screaming Frog, view-source
Usual cause
Template / plugin bug

What a multiple head tags error is

The HTML spec is blunt about this: a document has one <head> and one <body>. The head is where all the machine readable metadata lives, the title, meta description, canonical link, robots directives, hreflang, Open Graph tags, and your CSS and script references. When a page ships with two <head> elements, the document is malformed. It might still render, because browsers are forgiving, but "it still renders" is doing a lot of heavy lifting there.

What actually happens is the browser's HTML parser tries to recover. Per the spec's parsing rules, once the parser has closed the head and moved into the body, a second <head> start tag is simply ignored, and its children get reparented, often shoved into the body where meta tags do nothing. So the tags in that second head are not "also counted." They are frequently thrown away or relocated to a spot where search engines will not read them as head metadata.

Why it matters for SEO

The head is where your most important SEO directives live, so a broken head is a broken instruction set. Here is the practical damage:

  • Canonical confusion. If your rel=canonical sits in the second head and the parser drops or relocates it, Google may never see it and may pick its own canonical. Two canonicals across two heads is worse, because now you are sending conflicting signals.
  • Robots meta ignored. A noindex or nofollow directive that lands in the orphaned head can be missed, so a page you meant to keep out of the index gets indexed, or vice versa.
  • Title and description loss. If the real title is in head one and a duplicate empty title is in head two, you can end up with a mess in the SERP snippet.
  • Truncated head. When the parser closes the head early to recover, everything after that point (scripts, hreflang, structured data) can fall outside where it belongs, breaking rich results and rendering.

None of this is guaranteed catastrophic on every page, but it is the kind of quiet, inconsistent breakage that makes rankings wobble and drives you slowly insane during debugging. Malformed HTML around the head is worth fixing on principle, because you cannot reliably predict which tag gets eaten.

How the parser handles a second <head> <html> <head> #1 title, canonical <head> #2 noindex, hreflang parser Result after recovery ✓ Head #1 tags kept and read ✗ Second <head> start tag ignored ✗ noindex / hreflang reparented into body, treated as content Directives you needed: gone.

What causes it

CauseWhere it shows up
Template includes a partial header twiceCustom themes, nested includes
Two plugins each printing a <head>WordPress, plugin conflicts
Page builder wrapping content in a full docBuilders that output whole pages
Tag manager or A/B tool injecting a headGTM custom HTML, experiment scripts
Bad string concatenation in server codeManual HTML assembly

How to detect it

  • View source, not inspect. Open view-source: on the URL and search the raw HTML for <head. The browser DevTools Elements panel shows the corrected DOM, which hides the problem. You need the raw response.
  • Screaming Frog custom search: add a custom extraction or search rule counting occurrences of <head> and flag any page with more than one. This scales the check across the whole site.
  • curl the URL: a quick curl -s URL | grep -o "<head" | wc -l tells you how many head start tags the server actually sent.
  • W3C validator: paste the page or URL into the Nu HTML Checker; a stray head throws a clear parse error.
  • Sitebulb / other crawlers: most surface HTML validity and duplicate head issues in their hints.

How to fix it, step by step

  1. Confirm from the raw HTML. Use view-source or curl, not the rendered DOM, so you are debugging what the server actually emits.
  2. Find which layer prints the second head. Bisect. Disable plugins one at a time, or comment out template includes, and re-check the raw source until the duplicate disappears. In WordPress this is usually two things both hooking the header, or a header partial included twice.
  3. Remove the duplicate at the source. Do not try to paper over it with JavaScript that deletes the second head after load. Googlebot may read the raw HTML before that runs, and you are still shipping invalid markup. Fix the template or the plugin.
  4. Consolidate the important tags. Make sure the surviving single head contains your canonical, robots meta, title, description, hreflang, and structured data. Nothing SEO critical should be sitting in the body.
  5. Re-validate. Run the page through the Nu HTML Checker and re-crawl in Screaming Frog to confirm exactly one head across templates.
  6. Check the whole template family. A duplicate head is almost always a template level bug, so if the product page has it, the category and blog templates probably do too. Test one URL of each type.
DO
  • Debug from raw view-source or curl output
  • Fix the duplicate at the template or plugin level
  • Keep every SEO directive in the one real head
  • Re-validate with the Nu HTML Checker
  • Check every template type, not just one page
DON'T
  • Trust the DevTools DOM, it hides the bug
  • Delete the second head with client side JS
  • Leave canonical or robots meta in the body
  • Assume it is one page when it is a template
  • Ignore it because the page still renders

What good looks like

One <head> per document, closed cleanly before <body> opens, containing exactly one title, one meta description, one canonical, the right robots directive, and your hreflang and structured data. The Nu HTML Checker returns no head related errors, and Screaming Frog reports a single head element across the whole crawl. Boring and correct, which is exactly what you want from your HTML skeleton.

FAQ

Will two head tags always hurt my rankings?
Not always, and not predictably, which is the annoying part. Sometimes the surviving head has everything it needs and nothing breaks. But because the parser can drop or relocate tags from the second head, you cannot rely on that. Treat it as a real defect to fix rather than a risk to gamble on.
Why does the DevTools inspector show only one head?
Because DevTools shows the corrected DOM after the browser's parser has already recovered from the malformed HTML. The duplicate exists in the raw response the server sent, so you have to check view-source or curl to see it.
Can Google Tag Manager cause this?
Yes. A custom HTML tag that outputs a full <head> block, or a template that assumes it is injecting into a fresh document, can create a second head. Audit any custom HTML tags that write structural markup rather than just scripts.
Is one head with duplicate meta tags the same problem?
No, that is a separate issue. Duplicate canonicals or titles inside a single valid head is its own check. Multiple head tags is specifically about the document structure being malformed with more than one <head> element.
Not sure what else your templates are quietly breaking?

Malformed head markup usually travels with other template level issues. A full audit surfaces them before they cost you indexation.

Get an Advanced SEO Audit

Claude Vincent is a technical SEO consultant focused on crawlability, rendering, and AI-search visibility. He writes the field guides and case studies at SEO ProCheck, with a bias toward the durable, unglamorous work that decides whether search engines and AI answer engines can actually read and cite a site.

About SEO ProCheck

Technical SEO consulting and GEO strategy with 20 years of enterprise experience. Case studies, resources, and tools for search and AI visibility.

Work With Me

Technical SEO audits, GEO strategy, site migrations, and international SEO. Hourly consulting for teams who need hands-on support, not just reports.

Subscribe to our newsletter!

More from our blog