03 Nov Do iframes Affect Your SEO?
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.
Since you will be using the content from another website, you may be worried about lowering your website’s SEO ranking. We’ll go over how iframes affect SEO and how to ensure you’re using them to your advantage.
How do you use iframes?
You can create an iframe by inserting this code:
<iframe src=“URL of page being embedded”></iframe>
You can even customize the height and width of the embedded website and give it a scroll bar.
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.
What problems are common with iframes?
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.
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 search-engine 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.
So, 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.
This post was originally published March 2015. It was last updated on September 17, 2019.