What does Google say about SEO? /
Quick SEO Quiz

Test your SEO knowledge in 3 questions

Less than 30 seconds. Find out how much you really know about Google search.

🕒 ~30s 🎯 3 questions 📚 SEO Google

Official statement

An iframe placed within a noscript tag located in the head section can prematurely close the head tag during rendering. This displaces the following elements (including hreflang) into the body, making these SEO directives non-functional.
🎥 Source video

Extracted from a Google Search Central video

💬 EN 📅 18/10/2022 ✂ 8 statements
Watch on YouTube →
Other statements from this video 7
  1. Les ccTLDs imposent-ils vraiment un ciblage géographique automatique impossible à contourner ?
  2. Hreflang : HTML ou sitemap XML, quelle méthode choisir pour votre référencement international ?
  3. Peut-on vraiment utiliser des balises noscript dans le <head> sans pénalité SEO ?
  4. Pourquoi Google distingue-t-il le HTML source du DOM rendu ?
  5. Pourquoi croiser plusieurs sources de données est-il crucial en diagnostic SEO ?
  6. La Search Console affiche-t-elle vraiment les variations d'impressions en temps réel ?
  7. Comment tester le user-agent Googlebot directement dans Chrome sans extension tierce ?
📅
Official statement from (3 years ago)
TL;DR

An iframe placed within a <noscript> tag located in the <head> can prematurely close that section during rendering. Result: critical SEO elements like hreflang, canonical, or structured data end up displaced into the <body>, where they lose their function. It's a parsing bug that few practitioners have on their radar.

What you need to understand

Why does an iframe in the pose a problem?

Google's rendering engine analyzes the HTML to construct the DOM. When an iframe is found within a

Concretely: everything that follows — hreflang tags, canonical, meta robots, structured scripts — shifts into the . And in the , these directives are no longer interpreted as intended by crawlers.

Which SEO elements are affected?

All elements that must necessarily reside in the : hreflang (internationalization), canonical (duplicate management), meta robots (indexation directives), JSON-LD (structured data).

If these tags end up in the , Google may ignore them or treat them differently. For hreflang for example, it's a complete loss of the directive — no fallback in the .

In which cases do you encounter this scenario?

Primarily with tracking tags like Google Tag Manager or Facebook Pixel, often placed at the top of the page in a

Multilingual e-commerce sites with GTM are particularly exposed, as they often combine hreflang and third-party tracking.

  • Iframe in
  • Critical SEO elements (hreflang, canonical, meta robots) displaced into the = non-functional
  • Typical case: tracking tags (GTM, Facebook Pixel) at the top of the page
  • Impact: loss of internationalization directives, canonicalization, indexation

SEO Expert opinion

Is this statement consistent with field observations?

Yes, and it's even a known bug in certain HTML parsers from years back. The problem doesn't only concern Googlebot — modern browsers can also mishandle this case. But Google tends to be stricter about the positioning of SEO tags.

I've seen sites lose their hreflang associations without understanding why, until an audit revealed a GTM iframe in the . Search Console reports nothing specific, it just indicates that hreflang tags are absent — when in fact they're there, but poorly placed.

What nuances should be added?

Martin Splitt talks about "rendering," which suggests the problem appears after JavaScript execution. But in most cases, it's the raw HTML that's already broken. The HTML5 parser closes the as soon as it encounters certain elements within

[To verify]: the statement doesn't specify whether all types of iframes are affected, or only those in

How can you verify if your site is affected?

Inspect the rendered DOM via the Search Console testing tool or "View Rendered Source" in Chrome DevTools. Compare it with the HTML source. If your hreflang tags appear in the when they're coded in the , bingo.

Another test: use an HTML validator. It will flag the premature closure if the problem exists. But be careful — Google may parse differently than a standard validator.

Warning: this problem often goes unnoticed in standard audits. SEO tools read the HTML source, not the rendered DOM. You need to check manually or script a source vs. rendered comparison.

Practical impact and recommendations

What concretely should you do to fix this problem?

Move all tracking iframes out of the . Place them just after the opening tag, or even at the end of if the timing of triggering allows it. Most tracking scripts work perfectly from this position.

If you use GTM, verify the placement of the

Which errors should you avoid?

Never place an iframe — even an empty one — in the . The is reserved for metadata, not content or tracking elements. An iframe is by nature a content element.

Also avoid relying solely on the HTML source to diagnose. The problem can be invisible in the code but well present in the rendered DOM. Systematically use rendering inspection tools.

How can you verify that your site is compliant after correction?

  • Inspect the rendered DOM via Search Console "URL Inspection Tool"
  • Compare the HTML source with the final DOM in Chrome DevTools
  • Verify that hreflang, canonical, meta robots remain in the after rendering
  • Use an HTML validator to detect premature closures
  • Test with and without JavaScript enabled to isolate behaviors
  • Audit tracking tags (GTM, Facebook, etc.) and their positioning
This parsing bug is insidious because it doesn't generate a visible error — your SEO tags are there, but ignored. A thorough technical audit of the rendered DOM is essential to detect it. If your technical architecture is complex (multi-CMS, multiple third-party tags, internationalization), these verifications can quickly become time-consuming and require expertise in HTML/JS debugging. In this context, calling on a specialized technical SEO agency can save you valuable time and prevent costly mistakes.

❓ Frequently Asked Questions

Un iframe dans le <head> casse-t-il toujours le SEO ?
Pas toujours, mais très souvent. Le problème survient principalement quand l'iframe est dans une balise <noscript> située dans le <head>. Le parser ferme prématurément le <head>, déplaçant les balises SEO suivantes dans le <body> où elles perdent leur fonction.
Pourquoi mes balises hreflang ne sont-elles pas détectées alors qu'elles sont dans mon code ?
Inspecte le DOM rendu, pas juste le HTML source. Si un iframe ou un script mal placé ferme prématurément le <head>, vos balises hreflang se retrouvent dans le <body> et Google les ignore. C'est un cas classique de parsing cassé.
Où placer le code <noscript> de Google Tag Manager ?
Juste après l'ouverture de la balise <body>, jamais dans le <head>. C'est la recommandation officielle de Google, mais beaucoup de développeurs l'ignorent et placent le conteneur en haut de page, créant des problèmes de parsing.
Les outils d'audit SEO détectent-ils ce problème ?
Rarement. La plupart lisent le HTML source, pas le DOM rendu. Le problème est invisible dans le code mais réel après parsing. Il faut inspecter manuellement avec Search Console ou DevTools pour le détecter.
Ce problème affecte-t-il aussi les balises canonical et meta robots ?
Oui, tout élément censé résider dans le <head> et qui bascule dans le <body> peut être ignoré ou mal interprété. Canonical, meta robots, structured data JSON-LD — tous sont à risque si le <head> se ferme prématurément.
🏷 Related Topics
Crawl & Indexing JavaScript & Technical SEO International SEO

🎥 From the same video 7

Other SEO insights extracted from this same Google Search Central video · published on 18/10/2022

🎥 Watch the full video on YouTube →

Related statements

💬 Comments (0)

Be the first to comment.

2000 characters remaining
🔔

Get real-time analysis of the latest Google SEO declarations

Be the first to know every time a new official Google statement drops — with full expert analysis.

No spam. Unsubscribe in one click.