An iframe (inline frame) is an HTML element that embeds another HTML document in the current page, for example a video player, a map or a booking form from a third party. For SEO the question is how search engines treat the embedded content.
How is an iframe built?
The address of the embedded document goes in the src attribute. MDN points to title as important for screen reader users, sandbox to restrict what the embedded content may do, and loading="lazy" to defer iframes that are off screen. Each iframe is a separate browsing context and needs additional memory and computing power, so many iframes on one page can slow it down.
What does it mean for SEO?
Secondary sources agree on a cautious approach but differ on details. According to reports, Google can crawl iframe content and credits it to the document that was loaded, not to the embedding page. No Google source was found for this, so treat it as a claim. Google documents one rule: with indexifembedded, a page marked noindex may still be indexed when it is embedded in another page through iframes or similar tags.
Important content therefore belongs in the page’s own HTML.
Example
<iframe src="https://example.com/map"
title="Store locations"
loading="lazy"
sandbox="allow-scripts"></iframe>
Common mistakes
- The
titleattribute is missing, so screen readers cannot describe the frame. - Main content of the page exists only inside an iframe.
- A third-party iframe is embedded without
sandbox.
Sources
- <iframe> – MDN Web Docsdeveloper.mozilla.org
- Robots meta tag (indexifembedded) – Google Search Centraldevelopers.google.com
Last updated: