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.

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.

 

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.

Share:

author

Colton is the Director of SEO Strategy at Boostability testing and defining the products and processes that make Boostability's customers successful. He has been a part of Boostability for over 7 years. Colton loves hanging out with his family and gaming. He runs a personal blog over at www.coltonjmiller.com where he discusses gaming, life, and SEO.

11 Comments

  • Josh, March 30, 2015 @ 8:56 am

    I learned a few things from this post. I learned what an iFrame is and that it isn’t considered duplicate content. Very interesting article!

  • Andrew Williams, March 30, 2015 @ 11:23 am

    From experience I have with Iframes, and Iframed sites some people have there sites set up so all the pages are built on the homepage URL, and this is not SEO friendly and can definitely hurt your rankings. If your doing it to reference another site or pdf then it is OK, but I would probably only do this if absolutely necessary.

  • Becca Watters (Vaughn), March 30, 2015 @ 11:34 am

    I agree with Andrew! You for sure want to be careful about how and where you use any iFrames. We have seen websites come in that are fully created with iFrames, and it is very difficult to optimize them. It is best to use as directed above; in certain parts of your sites for a specific reason, such as the .pdf file example. Just be sure that any page you are using an iFrame on includes well written and unique content as well. Great post, Hannah!

  • Ammon Mailo, March 30, 2015 @ 11:43 am

    For the longest time, iframes remained a grey area for me until now. Thanks Andrew for spelling out iframes potential consequences on a website and how to best use them if one chose to do so. A keytakeaway is that iframes gives the source website the credit so it doesn’t necessarily hurt or benefit your website anyways.

  • Maria Williams, March 30, 2015 @ 4:52 pm

    I agree with you too Andrew. I actually have a client with a Iframed website and we are only able to target the home page. It’s interesting to know that it won’t cause duplicate content but at the same time is frustrated that it’s not SEO friendly. overall it was a great post Hannah and I learned more about #Iframes websites.

  • Sean R Parker, March 31, 2015 @ 8:39 am

    I’m not a fan of iframes from a user interface standpoint, but it’s good to know some of the advantages and I might actually use them to display PDFs better on my portfolio site. I don’t know. I guess I’ll play with it a little first.

  • Lindsey Potter, March 31, 2015 @ 11:57 am

    I was reading a Moz article about how embedding a link in the website’s code was poor practice and would result in lower rankings. I have never heard of iFrames before, so I’m trying to distinguish the difference. Are these considered the same thing?

  • Caz*, March 31, 2015 @ 5:26 pm

    I certainly get that! For those of us that were around at the dawn of iFrame use, if you’re like me you’re completely against any supposed functionality behind them. Thankfully, they’re a lot more functional these days and I’m coming back around on them.

  • Ben Hanzel, December 23, 2015 @ 11:17 am

    I’ve never heard about iframes before now. I think I could benefit from using them on some PDF files of my own website. It’d be nice to not have to download the file separately!

  • Mike Good, March 11, 2016 @ 10:20 am

    Very clear and easy to understand – thank you.

  • Tina Willis, March 19, 2016 @ 8:40 pm

    Does this apply to ALL embedded videos, or just those using iframe? I’m specifically wondering whether a video hosted on Wistia would have the same problems as YT. Wistia has a non-i-frame embed option.

Comments are closed.