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?
Gainchanger recommends Javascript API as one of the most popular solutions. Generating one of these script codes for your website allows you to insert things like maps, videos, and reviews. Using Javascript allows Google to crawl the individual bits of content. And in the case of reviews, that could help to build your siteโs authority.
Ready to Get Started?
Interested in learning more about Boostabilityโs SEO services? We help small businesses all over the world get found by helping to optimize their website. And this could include iFrame or javascript insertions depending on the website and the needs of the business. Our method is proven effective and we track data for millions of keywords every single month to monitor traffic and set strategies for our thousands of clients. Contact us today to learn more about how we can help grow your website online with small business SEO services.
This post was originally published in March 2015. It was last updated in April 7th, 2021 to reflect current information and data.