Can iFrames Harm Your WordPress Website’s SEO?

If you’re thinking about using iFrames on your website, you should first consider the search engine optimization (SEO) impact. iFrames offer an easy way to share content between two pages or websites. Rather than copying a piece of content on one source and publishing it on another, you can use an iFrame as a shortcut or workaround. Plus, creating an iFrame on the latter page will update it with the former page’s content. 

So, while iFrames are handy, are iFrames safe to use and will they harm your website’s SEO? Read on to learn more. 

What Is an iFrame and How Do They Work?

Also known as an inline frame, an iFrame is a Hypertext Markup Language (HTML) document element designed to show a different web page in a box-like structure.

iFrames are used to embed content, meaning it’s served from a different page than which it’s originally published. That means you can embed content from a separate page – the page can be on your website or an external website – by using an iFrame. 

iFrames work by essentially creating a new browser window. By default, this new window will be 300 pixels wide and 150 pixels, resulting in a 2:1 aspect ratio. Of course, you can customize the size of an iFrame by specifying different dimensions. The iFrame will feature the page’s content in a box-like frame.

The syntax for a basic iFrame consists of a pair of tags. You’ll need to create an opening iFrame tag and a closing iFrame tag. With the opening iFrame tag, you must include a URL. The URL included in an iFrame will determine the type of content it shows, and the iFrame will show the content published on that URL. iFrames support optional attributes, such as height and width attributes, but they all require a pair of tags and a URL.

iFrames and SEO: What You Should Know

iFrames aren’t necessarily bad for SEO. In some cases, they can actually be beneficial.

Despite what some may have told you, search engines can crawl iFrames. Search engines haven’t always been able to crawl iFrames – in fact, they would ignore them entirely in the past – but due to recent updates, they can now crawl iFrames.

When search engines encounter an iFrame on your website, they’ll follow it to the included URL andl treat the included URL like an ordinary link by following it. After which they’ll begin crawling the page on that URL.

How iFrames Can Help Your Website’s SEO

Using iFrames to embed content published externally can actually speed up certain aspects of your website. iFrames are separate browser windows and therefore, you can use them to embed visual content such as videos or high-resolution images without sacrificing your website’s server resources.

YouTube videos, for example, support iFrame embedding. Uploading a video directly to your website will consume your site’s server resources. Each time a visitor plays the video, some of your website’s server resources are consumed, which may cause your site to load more slowly.

You can also use iFrames to embed content from social media networks. From Facebook and Twitter to Instagram and LinkedIn, most social media networks support iFrame embedding. They offer a code-generation tool that you can use to create an iFrame snippet. Adding one of these iFrame snippets to your website will embed the content.

For a faster website, you can upload the video to your YouTube channel, followed by embedding it in an iFrame on your site. Visitors will be able to play the video from your website, but it will technically load from your YouTube channel. iFrame-embedded YouTube videos will conserve your website’s server resources so that it doesn’t experience sluggish page load times.

Speed and SEO are connected. To provide their users with the most positive and enjoyable experience, search engines use site speed for ranking purposes. They rank fast websites higher than sluggish websites that take longer to load. Using iFrames to embed videos and high-resolution images keep your website loading fast.

How iFrames Can Hurt Your Website’s SEO

On the other hand, using iFrames the wrong way could harm your website’s SEO. Pages that consist of nothing more than an iFrame may not rank. When you create an iFrame, you’ll embed content from another page so that search engines will typically process it as duplicate content. As a result, search engines may rank the page where the content was originally published, but not index the page showing the embedded content in an iFrame.

iFrames are prone to mobile compatibility issues. You can use relative measurement attributes when creating an iFrame. Even with this responsive format, though, the iFrame may not be compatible with mobile devices. iFrames show content exactly how it’s displayed on the page of the included URL. If the page features fixed desktop measurements, the iFrame may appear excessively large on mobile devices.

Tips for SEO-Friendly iFrames

If you’re going to use iFrames on your website, you should make them SEO-friendly. Google recommends adding a traditional text-based link with iFrames.

iFrames, of course, already feature an URL. While Google should follow the URL included in an iFrame, adding a traditional text-based link will ensure that Google crawls the embedded content. You can add this link either above or below the iFrame.

When using iFrames to embed your own website’s content, you should set canonical URLs. Setting canonical URLs will protect your website from ranking problems associated with duplicate content. Pages with iFrames will usually contain duplicate content. By setting canonical URLs, you can tell search engines where the content was published first.

Keep in mind that you shouldn’t embed content from an external source without the creator’s permission. YouTube and social media networks obviously allow iFrame embedding, assuming you use their tools to generate the iFrame snippets. For other websites, you’ll need the creator’s permission to embed their content in an iFrame.

In Conclusion

Whether iFrames are good or bad for SEO depends on how you use them. When used for videos and high-resolution photos, they can make your website faster. iFrames also allow you to take advantage of embedded social media content. If you build iFrame-only pages – or use iFrames to embed content from desktop pages – they may harm your website’s SEO.

For more SEO tips, check out the following Pressable blogs:

Using Technical and Marketing SEO Strategies

How to Use Keyword Mapping to Improve SEO

Website Hosting and SEO: What’s the Connection (and Why It’s Important)

SEO Should be FOM for Freelancers and Design Agencies

Pro Tips for Getting the Most Out of Yoast

Amanda Tsourakis

Amanda serves as the Head of Sales and Enablement for Pressable. She's worked in the tech space for well over a decade and has spent the majority of that time building/training/leading teams. She loves travel and adventure and when she's not working, you can find her spending time with her family, lounging pool/beach-side, playing tennis, working out, and meeting people/making friends all along the way!

Related blog articles