iFrames are very useful tools that help you bring pieces of another website onto yours to better enhance it. This works very well in the case of videos, e-commerce features, or perhaps a demonstration of how something works like lines of code from a developer. But that begs the question, since it’s content from another website, does it affect your SEO ranking? This article will go into how iFrames play into your SEO strategy. And, how you can use them to your advantage and even the growth of your website.
What is an iFrame?
The iFrame, a shortened version of “inline frame,” is a segment of HTML syntax. They are commonly implemented when using resources from one website on your own without creating duplicate content. Essentially, iFrames allow you to embed another website in the code of your website, like a page within a page.
How Do iFrames Work?
You can create an iFrame by inserting this code:
<iFrame src=“URL of page being embedded”></iFrame>
It’s beneficial versus inserting an image because more could be involved. It allows web developers to change the content within an iFrame without altering the code of an entire web page. You can customize the height and width of the embedded website and give it a scroll bar distinct from the rest of the page when it contains longer form content pieces.
When Should You Use an iFrame?
Websites use iFrames for various reasons: to embed videos from YouTube, slideshows from SlideShare, maps from Google, or content for advertisements. You can even use an iFrame to embed a PDF, meaning users won’t have to download a document. Use an iFrame whenever you’d like to share content that’s not text-based or requires special formatting difficult to replicate on your website platform.
The Impact of iFrames on SEO Performance
Are iFrames bad for SEO?
In the past, Google and other search engines couldn’t crawl iFrame content. Although users could see the iFrames, robots couldn’t. In some cases, once the robots entered the iFrame, they couldn’t get out again, meaning they didn’t index the content on the rest of the website either.
Today’s web crawlers, however, can usually travel freely between regular website content and iFrames, so no lingering issues remain. Google recommends providing additional context and links surrounding the insertion of an iFrame to help it better understand the purpose of the iFrame. Many SEO experts also predict that Google bots crawl backlinks to better recognize iFrames. And if that’s the case, these iFrames can add some valuable SEO juice.
How do iFrames affect my site’s SEO rankings?
Since search engines consider the content in iFrames to belong to another website, the best you can hope for is no effect. iFrames tend to neither help nor hurt your search engine ranking.
For this reason, it’s best to refrain from using iFrames on main pages that you want to rank high in search engine results. Instead, fill high-priority pages with useful, unique content and save iFrames for other pages.
Do iFrames cause duplicate content problems?
Since iFrames reference a different web page, rather than replicating the content, they shouldn’t create duplicate content. The crawling robots recognize the <iFrame> tag and don’t register the content as duplicate. However, they also see the source URL within the HTML syntax, meaning SEO credit goes to the original webpage, not the page with the embedded content. If you’re looking to up your own ante by including iFrames from another website on your own, you’ll need to reevaluate your strategy.
Does Google consider iFrames as “cloaking?”
“Cloaking” refers to a black hat tactic in which you present different content to search engine robots than to users who visit your page. In other words, cloaking can obscure poor content with good SEO. This practice can cause you to drop in search engine results, as cloaking defeats the whole purpose of rankings: to give users the best results for their searches.
Since iFrames clearly mark the source of the content in the HTML syntax, search engine robots understand that the content the user sees is the same content referred to in the source URL. iFrames are therefore completely distinct from cloaking, so don’t worry about being carded for black hat tactics.
How Can You Make iFrames SEO-Friendly?
Make sure search robots can access the content in your iFrame by indexing the iFrame with robots.txt. With this tool, you can choose to allow or disallow search engine crawlers to access the content of your page. For more information about robots.txt files, see our blog post about verifying you have the proper robots.txt file.
We recommend using Search Console to find out more about this and other potential crawling errors on your site. See our blog post on the features of Search Console for help using the free service.
Is There an Alternative to an iFrame?
iFrames offer several useful tools, such as a PDF insertion into the page or a video. But as we’ve outlined, there can be some drawbacks. Mainly that your site doesn’t get the credit for the content. So that begs the question, what are my options?
Ready to Get Started?
This post was originally published in March 2015. It was last updated in April 7th, 2021 to reflect current information and data.