RankpediaA plain-English encyclopedia of search

Iframe SEO

Embeds another web page inside the current one, but search engines rarely treat that content as part of your page.

If you have ever relied on an iframe for your main keyword content and wondered why it did not rank, you already know the risk.

Key points

  • Put primary content in the page HTML, not inside an iframe.
  • Add a descriptive title attribute and surrounding text for context.
  • Lazy-load iframes below the fold to improve page speed.
  • Use iframes only for supplemental content like videos, maps, or widgets.
  • Do not assume iframe content will be indexed or credited to your page.

A video embed that did not help rankings

A travel site embedded a YouTube video of a hiking trail inside an iframe, hoping the video's title would help it rank for 'best alpine hikes'. Google indexed the video separately but never credited the parent page. The page's own text was thin, so it stayed on page three. After moving the video description and transcript into the page HTML, it climbed to position five in two months, typical for how long it takes for SEO to update.

Three situations where iframes change your decision

  • Primary content only in iframe If your main keyword text lives inside an iframe, search engines may never associate it with your page. Write that content directly in the HTML instead.
  • Embedding low-quality third-party content An iframe from a spammy or irrelevant source can harm your page's trust signals. If you use JavaScript SEO techniques to load embeds, vet the embedded page before adding it.
  • Ignoring performance impact Multiple iframes or heavy embeds slow page load, hurting Core Web Vitals. For sites with multiple location pages, this can compound across all pages. Lazy-load them and test on mobile.

Three ways it goes wrong

  • No title attribute Without a descriptive title, screen readers and search engines lack context for the embed. Add one that summarises the content.
  • Missing surrounding text If the page has no unique text around the iframe, users and crawlers cannot tell what the page is about. Write a short introduction.
  • Assuming indexing is guaranteed Google can crawl some iframe content, but it is not guaranteed. Treat the embed as supplemental, not essential, especially on sites using Netlify SEO.

Common questions

Embed vs iframe: which is better for SEO?

Use <embed> for single-file content like PDFs; use <iframe> for full web pages. Neither passes ranking signals cleanly.

Does Google index iframe content?

Google can index some iframe content, but it is not guaranteed and the content is not attributed to the parent page.

Can I use an iframe for a map without hurting SEO?

Yes, for supplemental content like maps. Just add surrounding text and lazy-load it to avoid slowing the page.

Sources

  1. Google Search Central Covers crawling and indexing of embedded content
  2. Search Engine Journal Articles on iframe SEO risks and best practices
  3. Google PageSpeed Insights / Core Web Vitals documentation Performance guidance for lazy-loading and embeds