hreflang tags sit outside the head

In the reportHreflang link outside <head>

hreflang_outside_head · Issue

Short answer

This appears when a page's hreflang <link> tags end up outside its <head> once the HTML is read the way a browser builds the page. It usually happens when an element that belongs in the body, such as an <iframe> or stray text, comes before them and closes the head. Google requires hreflang tags inside a well-formed head.

Severity: High. Tags outside the head do not meet Google's requirement; fix it soon.

Why it matters

Google's guide to localized versions says the <link> tags must be inside a well-formed <head> section of the HTML.

What to do

  1. Look at the finding: it shows what closed the head early and each hreflang tag that ended up outside it, with the surrounding source.
  2. Move the element that closed the head — often an <iframe>, an <img> or text a plugin adds — into the body, or below the hreflang tags.
  3. Check the result in your browser's developer tools: the tags should appear inside <head>.

What we read

We read the page's HTML as served, with a parser that builds the page the way browsers do, without running JavaScript. A page is reported when any <link rel="alternate" hreflang> element ends up outside <head>. Tags written after </head> but before <body> are moved back into the head by the parser and are not reported, and a <noscript> inside the head does not close it.

Only pages that answered 200 with complete HTML are read; a page we cannot decode, or a very large one, is marked as not checked.

Example & evidence

Illustrative example — the start of one page, not a live audit.

https://bakery.example/en/ begins:

<head>
<title>Bakery</title>
<iframe src="https://bakery.example/banner/"></iframe>
<link rel="alternate" hreflang="fr" href="https://bakery.example/fr/">
</head>

An <iframe> cannot sit in the head, so the browser closes the head there and the hreflang tag ends up in the body. The page is reported with the <iframe> and the tag.

A possible correction: move the <iframe> into <body>.

Confirm & check again

Check for yourself: open the page in your browser's developer tools, in the Elements view, and see whether the hreflang <link> tags sit inside <head>; the page source alone does not show where the browser puts them.

Check again: Full audit — run a new audit of the site. The finding closes when the page is crawled again with complete HTML and every hreflang tag ends up inside <head>.

Limits & sources

The parser follows the rules browsers use, but it is not Googlebot's own, and tags added by JavaScript are not seen.

Confidence: High because the page is parsed the way browsers build it.

Sources

Editorial review: 29 September 2026