SEOscanner.app

Rule · Document head and metadata

The head is not closed early

SEO-HEAD-05C2 Recommended· w4

Class
C2 Recommended
Weight
4
Severity on fail
major
Applies to
Google

Test this rule on a live site with the canonical tag checker or the hreflang checker. Free, no account needed.

Scope and evidence

Evaluated on page (P). The book marks this requirement REQUIRED, SEARCH-ENGINE-SPECIFIC (Deliverable 5); Google's underlying statement is a recommendation.

The consequences are scored by SEO-CANON-01 and SEO-I18N-07, which report this rule as related. Robots meta tags displaced into the body still work for Google (§3.7).

Fail conditions

Each condition has a stable code and a reason template. The evaluator fills the placeholders from observed values only; no sentence in a report is generated.

  • head_closed_early

    The parser closed <head> early on {url}: {culprit} at line {line} is not allowed in <head>, so the elements written after it ({displaced}) were placed in <body>. Google advises making sure at least the <head> section is valid HTML, and it only accepts rel="canonical" and hreflang links from the <head>.

The documented fix

Move the culprit into <body>. Tag-manager <iframe> and <noscript> snippets belong immediately after the opening <body> tag; tracking <img> pixels, <div> wrappers and stray text never belong in <head>.

Sources, quoted

These are the passages the rule rests on, stored once in the knowledge base and emitted exactly as written. A citation marked for specific conditions appears only on findings with those codes.