This article will explain what an iframe is, how they are currently used, and how they can affect your search engine optimization.
An iframe (short for “inline frame”) is HTML syntax that allows you to embed a web page within another web page. (It’s like Inception for websites – a page within a page.) You can customize the height, width, border, and whether the frame has a scroll bar. Following is the snippet of HTML you would use to embed one page in another:
<iframe src=”URL of page you wish to embed”></iframe>.
Below I’ve used an iframe to embed another page on my site:
As mentioned above, iframes are used to embed one web page into another, and there are many purposes for which iframes are the best solution. They are useful when you have a content page that requires a specific component from another site, but you cannot or do not want to duplicate that content or embed the other site’s provided code. YouTube uses iframes in its embed code for when you wish to place a video on your web page. SlideShare uses iframes the same way to embed presentations. Gmail announced in 2010 that it would begin using iframes to make it so you can continue working on popped-out emails even if you close the parent inbox window. Some use iframes to display PDF articles within the page instead of requiring the user to click the link and download a separate PDF.
When using iframes, it’s important to understand the potential implications for your search engine optimization efforts. One client asked if using iframes would cause duplicate content issues, or if it is considered cloaking in the eyes of the search engines. Some have also asked whether the content within the iframe will help the search engine optimization of the page in which it’s embedded. I’ll address each of those questions in turn.
No, the use of iframes should not cause duplicate content issues. When search engine spiders crawl your page, they typically have difficulty comprehending frames and do not crawl and index the content within the <iframe> as part of the content of the page it’s embedded on. Therefore, they should not perceive the iframe content as duplicative of its original page. Some experiments have shown that Google crawlers can crawl the contents of an iframe and follow its links, but Yahoo! and Bing crawlers cannot. The search engines will see the source URL in the snippet of HTML syntax, and they give credit to the original page from which the content came. The page where you have embedded the iframe will not receive credit for any of the content from the original source within the iframe.
The definition of cloaking (a black hat SEO technique that can lead to penalty and is not a recommended tactic) is showing users who visit your web page different content than what you show search engines. By this definition, using iframes would not be considered cloaking. Search engines that crawl your page with an iframe can clearly see within the iframe syntax the source URL of the content you are embedding. Therefore, you are not showing two different things to search engines and website visitors.
The short answer is no, not really. Once again, the content and links within iframes are not typically crawled and indexed, and credit is definitely not attributed to the page where iframes are embedded. Because the content within the iframe is attributed to the source URL and not your own page, iframes to not offer any inherent SEO value for your on-page optimization. When it comes to iframes and SEO, they appear to neither directly help nor hurt your on-page search engine optimization.
There are still several viable uses for iframes in web development and design today, but SEO is not typically one of them. Focus on creating high-quality, relevant, unique content to avoid duplicate content issues rather than relying on iframes, and instead allow iframes to serve their intended purpose, like the ones outlined above. Consult with your search engine optimization specialist and/or web developer on whether iframes are the right solution for you.
This article about iframes and SEO is written from the perspective of a search engine optimization specialist and inbound marketer, not a developer. For a more advanced, in-depth view of how to properly use iframes, I recommend this informative article from W3Schools.com.