squirrelscan
GitHub

Meta tags in the body: why they are silently ignored

A meta description or robots tag inside body is not read by anything. squirrel finds every meta element that ended up outside the head.

What a meta tag in the body is

<meta> elements belong in <head>. A meta element in the body is parsed as content, not as metadata, so browsers and search engines ignore it. The page looks fine and the tag does nothing.

It usually means the head was closed earlier than intended, or that a component injecting head content rendered in place instead. A malformed tag before it, or content emitted before <head> was finished, can also cause the parser to open the body early and put everything after it in the wrong place.

What squirrel checks

The rule runs on every crawled page over the selector body meta, skipping microdata. It emits a single check named meta-in-body:

  • Pass when there are none. Message: All meta tags correctly placed in <head>.
  • Fail otherwise. Message: Found N meta tag(s) in <body>, the same wording for one tag or many. Each item is identified by its name, its property, or unknown, labelled with its content truncated to 50 characters. Severity error, weight 8.

Microdata exemption

A <meta> with an itemprop attribute is schema.org microdata, which the HTML Standard allows anywhere in the body, and ecommerce themes emit it inside product markup. These are not reported. The exemption is exact: a meta that has itemprop together with name, http-equiv or charset is still reported, because the standard does not allow that combination. RDFa <meta property> tags in the body are also still reported, even under an RDFa ancestor.

The selector reads the parsed DOM, so it reflects where the browser’s own parser placed the element, not where it appeared in the source. A meta element written inside the head but pushed into the body by a parse error is reported here, which is the correct result: that is where it ends up.

How to fix it

<head>
  <meta name="description" content="…" />
</head>

Move the tag into the head. When a whole group of tags is in the body, look for what closed the head early: an unclosed tag, a stray character, or a component rendering head content into the page.

A framework’s head component has to hoist its output into the document head. Rendering it inline produces exactly this finding.

Rule IDcontent/meta-in-body
CategoryContent
ScopePer-page
Severityerror
Weight8/10

Enable / disable

Disable this rule

[rules]
disable = ["content/meta-in-body"]

Disable all Content rules

[rules]
disable = ["content/*"]

Enable only this rule

[rules]
enable = ["content/meta-in-body"]

enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.

Content findings ship in every audit next to the SEO, performance and agent experience rules. See Fix SEO issues with AI for how an agent works through a report.

References

Check your site

Run squirrel audit https://example.com and open the Content section of the report. Every misplaced meta tag is listed by name with its content. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.

Type to search…

↑↓ navigate↵ openesc close