Ramón Saquete

Written by Ramón Saquete

The HTML tag <iframe> or inline frame is used to embed content from one web page within another. This content is usually from an external domain. It is commonly used to embed videos, maps, advertisements and other content from external services. The use of the <iframe tag> with advertising allows, to a certain extent, to isolate the impact that advertising has on the initial page load performance.

How to program

The tag <iframe> is used as follows:

<iframe src=”URL inside iframe”></iframe>

Additional adjustments

If we want to prevent the content of our page from being displayed inside an inline frame(iframe) of another website, we can use the following meta tag:
<meta http-equiv=”X-Frame-Options” content=”deny”>

Or also the equivalent HTTP header parameter:

x-frame-options: deny

If we want to allow the domain to display inside iframes its own contents, the value “sameorigin” can be used instead of “deny”. If, instead, we want to allow iframes from a specific URL, for example from https://www.humanlevel.com/, it would be by assigning this parameter the value “allow-from https://www.humanlevel.com/”.

Effects on SEO

Google usually ignores the content that appears inside iframe tags, so it is not recommended to place inside the iframe the relevant content to be positioned. Google recommends providing links to the iframe URL in order to get your content indexed. In the event that Google indexes the content of the iframe, it may rank the URL of the iframe ahead of the page that includes it.

Additional references

  •  | 
  • Last modified on
Ramón Saquete
Ramón Saquete
Web developer and technical SEO consultant at Human Level. Graduated in Computer Engineering and Technical Engineering in Computer Systems. He is also a Technician in Computer Applications Development and later obtained the Pedagogical Aptitude Certification. Expert in WPO and indexability.