Does Google Crawl and Index iFrames?  - An iFrame SEO Guide

Does Google Crawl and Index iFrames? - An iFrame SEO Guide

December 15, 2023
Marketing Two Cents

Table of Contents (Click to show/hide)

Data Analysis Skills | DEANLONG.io
10.54%

Monthly
Active User Rate

Daily Budget
$5000

Daily
Campaign Budget

Click-through rate increase
60%

Increase
Click-through Rate

an icon shows a lightbulb that indicates being creative | DEANLONG.io
15%

Growth
Return on Investment

Data Analysis Skills | DEANLONG.io
#1

Customer
Segmentation

Daily Budget
#2

Prioritisation of
Limited Resources

Click-through rate increase
#3

Competitive
Responses

an icon shows a lightbulb that indicates being creative | DEANLONG.io
#4

Consumer
Change

The iFrame History on Indexing and Rendering


For years now, people have been trying to crack the code on whether or not Google could crawl or index iFrame content.


iFrame content (or in-line frame content) gives website owners the opportunity to seamlessly add content directly from other platforms to your page.


For example:

***My Youtube SEO Checklist Here Is Using iFrame***


But could iFrame content cause conflicts with search engine rankings?


Can Google recognise where iFrame content originates to avoid duplicate content penalties?


Does Google crawl and index anything in an iFrame in the first place or skip right over it?


Let's dig a little deeper right now!


Does Google Crawl and Index iFrame?


According to Google Search Central (straight from the horse's mouth from the folks at Google), the use of iFrame content is not at all recommended.


In fact, Google says – in no uncertain terms – that "We recommend that you avoid the use of iFrame's to display content".


At the same time, though, Google also acknowledges that iFrame content isn't going away anytime soon. They also say that iFrame content "may not be indexed or available to appear in Google search engine results".


That "may not be indexed" part is where a lot of people focus. Here is what Google Webmaster Guideline says:


"The content displayed via iFrames may not be indexed and available to appear in Google's search results. We recommend that you avoid the use of iFrames to display content. If you do include iFrames, make sure to provide additional text-based links to the content they display, so that Google bot can crawl and index this content."


In the past, Google (as well as other search engine platforms) were not capable of crawling or indexing content tucked inside of iFrames.


This meant that end-users could see the content without any issue whatsoever but whatever was inside of that frame was essentially invisible to search spiders.


Today, though, iFrames are not the impenetrable fortress they used to be.


No, in fact, search advocate at Google John Muller said during a Google Hangout in June 2017 that Google could – and often does – crawl iFrame content and index it as well.


"If a page is embedded within and iFrame that it's possible that Google will index that embedding page as well. When we render that page Google will see your content because it's visible within the IFrame.
.… Google may even say this is the whole page with this content on it and will index it just like that"


So there you have it, right from John Muller, one of the most legendary names in Google Search history.


iFrame content can be crawled and can be indexed now.


How Does Google Crawl and Index iFrame Content?


As highlighted a moment ago, Google does not recommend using iFrame content on pages because of the trouble they cause to search engine spiders rendering.


Nowadays, though, Google search spiders are much more effective and able to read what's inside of iFrame content.


By directly rendering the iframe & frames, Google is able to crawl the iFrame page content and inject it as a part of the hosting page (it's also called "DOM Flattening"). If you wanna check if Google can actually see the embedded content, try the "mobile-friendly test" in the Google Search Console (See update below).

-------- Update as of 06 Dec 2023 ----------

On 05 Dec 2023, Google  announced the retirement of its Mobile Usability report, mobile-friendly test tool, and API, marking a significant shift in the mobile SEO landscape. As these tools phase out, Google suggests using Lighthouse, an open-source, automated tool for improving the quality of web pages. Lighthouse provides audits for performance, accessibility, progressive web apps, SEO, and more, offering a comprehensive view of your site's capabilities on mobile devices.

To perform a mobile-friendly test with Lighthouse:

  1. Via web.dev: Simply enter your site’s URL on the web.dev measure page to receive a detailed report​​.
  2. Through Chrome: Lighthouse is integrated into Chrome's Developer Tools, allowing for an immediate and robust site audit​​.
  3. Via Geekflare API: Use the Geekflare Lighthouse API to obtain performance data in various formats, with options to focus on specific metrics such as SEO​​.
  4. Using Node.js: Install Lighthouse as a Node module to run tests programmatically, ideal for continuous integration setups​​.

References:

-------- End of Update as of 06 Dec 2023 ----------


Google bots render pages as headless browsers to execute JavaScripts & CSS to get any content that is loaded dynamically. Moreover, it allows CSS to "hide content" (something like display=none) so that the content it loads can be 'read' as a user would. 

 

This headless browser (Google bot) is capable of loading iFrames. It parses the iframe's content (HTML, Javascript or video, etc.) and 'inject' it into the document (DOM) flow. (similar to how the iframe appears inline visually to users!) 

 

However, many factors can be the reason that hinders the iframe from being loaded. For example, Google has a quota for the number of HTTP requests that will make in the course of rendering a page. With that in mind, iFrames are extra requests, so they might get skipped. 

 

Barry Hunter, the Google Diamond Product Expert, recommends using 



To get some idea of how Google crawls the iFrame. They use a similar headless browser to render. So can look at the rendered HTML to see if the iframe was crawled or not. 

 

Keep in mind the crawler is not precisely the same. The headless browser they use can be Google bot or not. But it's a clue to see if Google's headless browser load it. 


Google clearly states that "if you do use iFrame content, make sure that you use extra text based links to that content that is being displayed, allowing the Google bots to crawl and index the information accurately".


If content within the iFrame is crawled and indexed, it is going to be considered (by Google, anyway) to be content on that page. There is no distinction between whether or not the content originates elsewhere and is simply being displayed here.


At least not yet, anyway.


Tips and Best Practices for Optimising iFrame Content


To avoid any potential issues or pitfalls while using iFrame content, here are some tips and best practices to optimise your web pages.


Leverage X-Frame-Options = DENY Meta Tag


First, you can take advantage of an iFrame that leverages X-Frame-Options = DENY.


This will let you exclude certain parts of a page (the iFrame, in this case) from search results completely. Google will spot the no-index meta-tag and avoid indexing the content entirely.


Leverage JSON Structured Data in iFrame Head


You can also place structured data inside of iFrame heads as well. If that's the approach you are going to take, though, make sure that you are leveraging the JSON schema. Json-ld script tags get included in the rendered HTML content. Do not use microdata in iframe content for Structured Data. Once you implement the structure data, use the rich result tool to test it.


Leverage Contextual Text & Backlinks


Google recommends that iFrame content is accompanied by text-based links to the content that the iFrame itself is currently displaying. This allows the Google search engine robots to crawl and index the content more accurately, all by you offering backlinks (and contextual anchor links) that Google can quickly decipher.


By using Kino keel tags within the iFrame page, you can go just a little bit further to better delineate the connection between the embedding content and the iFrames version on your page.


Google will try to figure out this connection between the frames version and the embedding page. But you can do better to push the extra mile. Use Canonical Tag in the iFrame page & the embedding page to point to the page you want to credit. Canonical tag example can be like this


<link href="https://www.deanlong.io/blog/best-practices-for-youtube-video-seo" rel="canonical">


It's also an option to use "Robots.txt" to exclude the embedding page from an index. For example, suppose you included an iframe from your own root domain, which is disallowed via robots.txt. In that case, the iframe's content is not included in the rendered results. But that's something that's only going to be effective with the Google Chrome browser.


How to signal Google to index as iFrame but not the as a page?


In late January 2022, Google rolled out a brand-new robot meta tag, "indexifembedded".


This tag will tell Google directly whether or not you'd like your content to be indexed every time it is embedded with IFrames (or similar tags) – even if the content page itself has a "noindex" meta tag attached.


<meta name="googlebot" content="noindex"/>
<meta name="googlebot" content="indexifembedded"/>
<!-- OR -->
<meta name="googlebot" content="noindex,indexifembedded"/>


Alternatively, you can specify the tag in the HTTP header

X-Robots-Tag: googlebot:noindex 
<!-- OR -->

>X-Robots-Tag: googlebot:noindex,indexifembedded



Publishers will gain a lot more control over their content with this tag. If publishers want content indexed every time it's embedded elsewhere, but may not necessarily want content indexed on their own domains or pages, they can only use the "indexifembedded" tag in conjunction with the "noindex" tag.


However, it's important to know that only Google is currently supporting this new tag.




References


  • https://developers.google.com/search/docs/advanced/guidelines/rich-media-files
  • https://support.google.com/webmasters/thread/43256496/iframe-content-and-seo?hl=en
  • https://developers.google.com/search/docs/advanced/guidelines/rich-media-files#4
  • https://support.google.com/webmasters/thread/110159951/are-iframes-ignored-by-google-crawlers?hl=en
  • https://www.seoclarity.net/blog/iframe-seo
  • https://www.boostability.com/content/the-affect-of-iframes-on-seo
  • https://websiteadvantage.com.au/Google-IFrame-Crawling-Indexing
  • https://www.seroundtable.com/google-iframes-seo-24098.html

Best Practices
Google
Industry Update
SEO
Technical SEO
Dean Long | Expert in Growth MarketingHongxin(Dean) Long

Dean Long is a Sydney-based performance marketing and communication professional with expertise in paid search, paid social, affiliate, and digital advertising. He holds a Bachelor's degree in Information Systems and Management and is also a distinguished MBA graduate from Western Sydney University.

Related Posts