03 Nov Do iframes Affect Your SEO?
You may consider using iframes if you want to use resources from another website without creating duplicate content. An iframe is part of HTML syntax. It stands for “inline frame.” 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, will you be at risk of lowering your website’s SEO ranking? We’ll answer this question and others to help you decide if you should use iframes.
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.
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.
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.
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.
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 and has been updated to reflect current information.