Does Google ignore iframes? A recent thread on Reddit has sparked discussion among SEO professionals.
The user who started the thread believes that Google doesn’t crawl iframes, but is this assumption accurate?
This article will debunk myths about Google’s ability to crawl iframes, examine Mueller’s response, and discuss the SEO impact.
The Myth: Google Doesn’t Crawl iFrames
Historically, there was a time when search engines struggled to crawl and index content within iframes.
Search engine robots couldn’t access the content inside iframes, and in some cases, they couldn’t exit the iframe to continue crawling the rest of the website.
Additionally, the content in iframes was often considered to belong to another website, leading to uncertainty about whether it should be indexed.
The Reality: Google Can & Does Crawl iFrames
Contrary to the Reddit user’s belief, Google has made significant advancements in crawling iframes.
Today, Google can directly render the iframe and inject its content as part of the hosting page, a process also known as “DOM Flattening.”
Mueller addressed the issue by responding to the thread with the following insights:
“Google does try to crawl iframed content and include it in the indexed page, if it’s allowed. It’s not always trivial though, and I don’t know how other search engines handle it. If you have something that you absolutely want indexed within the context of a page, I’d work to include it directly rather than relying on iframes.”
Mueller went on to provide further advice for those who use embedded or iframed content on their pages:
- Use the “x-frame-options” header to block iframing entirely if it’s not desired.
- Use “noindex” robots meta tags or “x-robots-tag” if neither the page nor its embedded content should be indexed.
- Use “indexifembedded” along with “noindex” if the embedded page itself shouldn’t be indexed, but its content can be included in a page that’s iframing it.
If you’re concerned whether Google can see the content in iFrames, you can use the “mobile-friendly test” in Search Console.
iFrames Not Generally Recommended
Due to the potential for indexing challenges with iFrames, Google recommends refraining from using them as much as possible.
Including important content directly on the page or using other embedding techniques can provide better SEO results and ensure that Google can properly index the content.
While iframes may be useful for embedding external content, such as videos and interactive elements, consider the limitations when designing a website.
Featured Image: Melisa Parlak/Shutterstock