How to put an iFrame into Confluence

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

An IFrame (Inline Frame) is an HTML document embedded inside another HTML document on a website. The IFrame HTML element is often used to insert content from another source, such as an advertisement, into a Web page.

Although an IFrame behaves like an inline image, it can be configured with its own scrollbar independent of the surrounding page's scrollbar.

Please note that some sites do not work in an iframe. These have cross scripting protection in their headers. For example, Google has

1 2 x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block

If these (or similar) are present in the response from the website, then you will not be able to display them in an iframe. Both Google and Facebook are two examples of this. Confluence also has protection to stop itself being displayed. Please see Confluence page does not display in an iframe in Confluence Data Center for more information.

Solution

(Auto-migrated image: description temporarily unavailable)
  1. Log in as Confluence Administrator, then

  2. Go to Manage apps at

    (Auto-migrated image: description temporarily unavailable)

    > Manage Apps

  3. Search for "Confluence HTML Macros" with "All apps" selected in the dropdown

  4. Under "System apps", click on "Confluence HTML Macros" to expand the app details

  5. Expand the modules in the far-right column

  6. Enable the module called "html (html-xhtml)"

    (Auto-migrated image: description temporarily unavailable)
  7. The HTML macro is now available. When creating or editing a page, insert the "HTML" macro:

    1. Go to + (Insert more content) > Other macros

      (Auto-migrated image: description temporarily unavailable)
    2. Search for the HTML macro

      (Auto-migrated image: description temporarily unavailable)
    3. Paste the following code inside the macro, replacing URL with the website you want to include. Modify the other parameters as you see fit.

      Iframe

      1 <iframe src="URL" noborder="0" width="830" height="800" scrolling="yes" seamless></iframe>
  8. Save the page

Alternatively, there are apps available that provide similar functionality that do not require the HTML macro, can provide a smaller attack surface, and can provide increased security. Please note that Atlassian does not provide support for these apps but they can be used as an alternative if there are security concerns with the HTML macro.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.