iFrames are convenient when you want to add outside content embedded in your page. Only they come with risks. Not just for security and performance, but they can also impact your SEO gains. Keep reading and we will explain the iFrame SEO issues and which alternatives you can use instead.
What is an iFrame and why is it used?
An iFrame is an HTML element which gives you the ability to embed documents, videos and other types of media on your page. Inside the frame, you can add content from another source. This means that when you add an iFrame, you have a secondary webpage to your main page.
Furthermore, frames are not only used in webpages but are also used in software applications especially in technical support departments. Such examples include clicking on menu items which open a frame embedding a document with the needed information.
However, using iFrames can slow down your performance and may open doors to security vulnerabilities. You need to be careful what website you will embed in your page and only use websites from trusted sources. Since you have no control over what is shown in the website, you may be at risk of sanctions, which in turn can affect your search rankings.
How Google processed iFrames
The problems with iFrames are that pages that contain iFrame tags can display multiple URLs for a single page. An iframe page can also be found from another iFramed page. In theory, the HTML tag should be used only once. But with the use of iFrames, you will have multiple HTML tags. This means that the original page should be crawled with all the iFrame tags including the iFrame’s HTML content. This implies that link equity can be chosen from either the master page or the iFramed page. There is a risk that it will confuse search crawlers resulting in an unintended indexation.
According to John Mueller, Google admittedly stated that it is possible that the page embedded within an iFrame will be indexed but it is difficult to control. This means that it may not be indexed correctly. They try their best to highlight the original page rather than just the iFrame. However, you cannot really tell which part of your content will be visible on the web and search.
Therefore, Google advises you to ask the website that is using the iFrame to make a rel canonical on that page linking to the actual content version you require. On the other hand, if you do now wish that your pages are visible within an iFrame, you can use a special meta tag.
Iframes Alternatives
So now we know, the content embedded inside iFrames may not always be indexed and won’t be able to appear in SERP properly. Google recommends that you avoid using them to display content for this reason. Here are the alternatives you can use to ensure Google still crawls your media content:
Maps
The embedded maps for Google maps used in HTML is an iframe.
<iframe width="600" height="450" frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/undefined?origin=...&q=...&destination=...¢er=...&zoom=...&key=..." allowfullscreen></iframe>
Instead of Google Maps, try Google Maps API that generates a JavaScript code:
<script type=”text/javascript” src=”//maps.googleapis.com/maps/api/js key=API_KEY&sensor=true_OR_false”></script>
Videos
When embedding videos to your webpage, the default embed code, given by sources like YouTube and Vimeo, are iFrames.
However, there is an alternative you can use to avoid using iFrames. Rather, YouTube offers YouTube Player API for iframe Embeds.
Here is a guide on how to do this. By using the Javascript API you can also have more control over the video functionality such as queuing videos, pausing or retrieving video information.
Transcripts
Transcripts are a useful feature in videos for the hearing impaired or users without sound. Instead of being hidden behind an iFrame, you can edit your .srt file and create a transcription yourself. The transcription can then be added under your video.
Return.co recommends you upload your video to YouTube in private mode. A .srt is automatically generated for you which you can then download and edit. From then you can reupload the .srt file.
Review
It is recommended to add a review feature onsite rather than using iframes from outside review sites like TripAdvisor, Google and so on. This will help the search engine crawl your website and include your reviews inside their rich snippets.
Final thoughts and Recommendations
iFrames can make your content more engaging to your users. Except it comes at a price. Decrease in security, performance and unclarity in the way your website will be crawled. For these reasons, we recommend you avoid using iFrames whenever you can and try to use the above alternatives. Having these in place will avoid any difficulties in indexing and improve your overall performance.
At Gainchanger we provide an end to end solution automate the tedious part of SEO to allow you to scale your results exponentially and focus on what really matters.
Get in touch for a free 5-minute consultation or to start scaling your strategies today.
Veteran content writer with focus on Technology and SEO.