- How to put an iFrame into Confluence
- Purpose
- Solution
- Import Content Into Confluence
- Import content from other Confluence sites
- Import content from a Microsoft Word document
- Import web content
- Importing content from another wiki
- Import other content
- Migrate to Confluence Cloud
- HTML Include Macro
- Security considerations
- Add this macro to your page
- Change the macro parameters
- Enabling the HTML Include Macro
- Troubleshooting
- Other ways to add this macro
- Add this macro as you type
- Add this macro using wiki markup
- HTML Include Macro
- Security considerations
- Add this macro to your page
- Change the macro parameters
- Enabling the HTML Include Macro
- Troubleshooting
- Other ways to add this macro
- Add this macro as you type
- Add this macro using wiki markup
- HTML Include Macro
- Security considerations
- Add this macro to your page
- Change the macro parameters
- Enabling the HTML Include Macro
- Troubleshooting
- Other ways to add this macro
- Add this macro as you type
- Add this macro using wiki markup
How to put an iFrame into Confluence
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms .
Purpose
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
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 for more information.
Solution

- Log in as Confluence Administrator, then
- Go to Manage apps at
>Manage Apps
- Search for «Confluence HTML Macros» with «All apps» selected in the dropdown
- Under «System apps», click on «Confluence HTML Macros» to expand the app details
- Expand the modules in the far-right column
- Enable the module called «html (html-xhtml)»
- The HTML macro is now available. When creating or editing a page, insert the «HTML» macro:
- Go to + (Insert more content) > Other macros
- Search for the HTML macro
- Paste the following code inside the macro, replacing URL with the website you want to include. Modify the other parameters as you see fit.
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.
This document outlines the steps needed to insert an iFrame into Confluence. An IFrame (Inline Frame) is an HTML document embedded inside another HTML document on a website.
Import Content Into Confluence
There are a number of ways you can get existing content, such as text, images and other content into Confluence.
Import content from other Confluence sites
To import content from another Confluence site you can:
- Import a backup of the entire Confluence site
- Import an XML export of an individual space. Page history, attachments, and page content will be preserved.
On this page:
Import content from a Microsoft Word document
The Office Connector allows you to create pages by importing Word documents. The document content is copied onto one or more Confluence pages. See Import a Word Document into Confluence.
Import web content
To embed web content on a page:
- Use the Widget Connector Macro to display videos, slide shows, twitter chats, documents and more, sourced from other web sites and displayed on your Confluence page.
- Embed an external web page into Confluence with the HTML Include macro.
- Use HTML code in a page with the HTML macro.
Note: The HTML macro is not enabled in all sites. Talk to your Confluence Admin about whether you can use this macro.
Importing content from another wiki
Confluence does not provide a method for importing content from another wiki.
You may be able to build your own import solution using our REST APIs, as mentioned below, or work with an Atlassian Solution Partner to develop a custom solution.
Import other content
Importing non-wiki markup into Confluence requires a conversion process:
- Text with basic formatting can be pasted directly into the editor. This includes simple Word documents or web pages.
- Confluence pages saved to disk can be imported from disk .
- Files can be uploaded in bulk using the Confluence WebDav Plugin. See Use a WebDAV Client to Work with Pages .
- Build your own import solution using the Confluence APIs.
Migrate to Confluence Cloud
If you’re migrating from Confluence Server to Confluence Cloud, you can use the Confluence Cloud Migration Assistant to migrate your content and spaces.
HTML Include Macro
Add the HTML Include macro to a page to include the contents of specific URL in a Confluence page. This allows you to embed a webpage in your Confluence page.
This is a legacy macro, and is often disabled by Confluence administrators for security reasons.
On this page:
Security considerations
HTML macros are disabled by default
The HTML macro will only be available if it has been enabled by an administrator. Enabling these macros can make your Confluence site vulnerable to cross-site scripting attacks.
Add this macro to your page
To add the HTML Include macro to a page:
From the editor toolbar, choose Insert > Other Macros.
You can then publish your page to see the macro in action.
Change the macro parameters
Macro parameters are used to change the behaviour of a macro.
To change the macro parameters:
- In the editor, click the macro placeholder and choose Edit.
- Update the parameters as required then choose Insert.
Here’s a list of the parameters available in this macro.
Parameter Required Default Description HTML Page’s URL
(url )Yes None The URL of the page to include. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets ( example ).
Enabling the HTML Include Macro
The HTML Include macro is disabled by default. You’ll need Confluence Administrator or System Administrator permissions to enable this macro.
Enabling these macros can make your Confluence site vulnerable to cross-site scripting attacks. You should only turn on these macros if you trust all your users not to attempt to exploit them. We strongly recommend leaving this macro disabled if you allow self-signed up or anonymous users to create content.
To enable the HTML Include macro:
- Go to >Manage apps
- Select System from the drop down and search for the Confluence HTML Macros system app.
- Expand the listing and enable the html-include (html-include-xhtml) module.
Administrators can also choose to use the allowlist to restrict URLs that can be displayed in the HTML Include macro.
Troubleshooting
- Administrators can define an allowlist of trusted URLs. If a URL is not in the allowlist, you will see an error message in the HTML Include macro.
- You can only use the HTML Include macro for pages with absolute links. If you use the macro to include an HTML page that has relative links, you will see a ‘Page Not Found’ error. See CONF-6567 — Getting issue details. STATUS .
Other ways to add this macro
Add this macro as you type
Add this macro using wiki markup
This is useful when you want to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.
Macro name: html-include
Macro body: None.
HTML Include Macro
Add the HTML Include macro to a page to include the contents of specific URL in a Confluence page. This allows you to embed a webpage in your Confluence page.
This is a legacy macro, and is often disabled by Confluence administrators for security reasons.
On this page:
Security considerations
HTML macros are disabled by default
The HTML macro will only be available if it has been enabled by an administrator. Enabling these macros can make your Confluence site vulnerable to cross-site scripting attacks.
Add this macro to your page
To add the HTML Include macro to a page:
From the editor toolbar, choose Insert > Other Macros.
You can then publish your page to see the macro in action.
Change the macro parameters
Macro parameters are used to change the behaviour of a macro.
To change the macro parameters:
- In the editor, click the macro placeholder and choose Edit.
- Update the parameters as required then choose Insert.
Here’s a list of the parameters available in this macro.
Parameter Required Default Description HTML Page’s URL
(url )Yes None The URL of the page to include. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets ( example ).
Enabling the HTML Include Macro
The HTML Include macro is disabled by default. You’ll need Confluence Administrator or System Administrator permissions to enable this macro.
Enabling these macros can make your Confluence site vulnerable to cross-site scripting attacks. You should only turn on these macros if you trust all your users not to attempt to exploit them. We strongly recommend leaving this macro disabled if you allow self-signed up or anonymous users to create content.
To enable the HTML Include macro:
- Go to >Manage apps
- Select System from the drop down and search for the Confluence HTML Macros system app.
- Expand the listing and enable the html-include (html-include-xhtml) module.
Administrators can also choose to use the allowlist to restrict URLs that can be displayed in the HTML Include macro.
Troubleshooting
- Administrators can define an allowlist of trusted URLs. If a URL is not in the allowlist, you will see an error message in the HTML Include macro.
- You can only use the HTML Include macro for pages with absolute links. If you use the macro to include an HTML page that has relative links, you will see a ‘Page Not Found’ error. See CONF-6567 — Getting issue details. STATUS .
Other ways to add this macro
Add this macro as you type
Add this macro using wiki markup
This is useful when you want to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.
Macro name: html-include
Macro body: None.
HTML Include Macro
Add the HTML Include macro to a page to include the contents of specific URL in a Confluence page. This allows you to embed a webpage in your Confluence page.
This is a legacy macro, and is often disabled by Confluence administrators for security reasons.
On this page:
Security considerations
HTML macros are disabled by default
The HTML macro will only be available if it has been enabled by an administrator. Enabling these macros can make your Confluence site vulnerable to cross-site scripting attacks.
Add this macro to your page
To add the HTML Include macro to a page:
From the editor toolbar, choose Insert > Other Macros.
You can then publish your page to see the macro in action.
Change the macro parameters
Macro parameters are used to change the behaviour of a macro.
To change the macro parameters:
- In the editor, click the macro placeholder and choose Edit.
- Update the parameters as required then choose Insert.
Here’s a list of the parameters available in this macro.
Parameter Required Default Description HTML Page’s URL
(url )Yes None The URL of the page to include. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets ( example ).
Enabling the HTML Include Macro
The HTML Include macro is disabled by default. You’ll need Confluence Administrator or System Administrator permissions to enable this macro.
Enabling these macros can make your Confluence site vulnerable to cross-site scripting attacks. You should only turn on these macros if you trust all your users not to attempt to exploit them. We strongly recommend leaving this macro disabled if you allow self-signed up or anonymous users to create content.
To enable the HTML Include macro:
- Go to >Manage apps
- Select System from the drop down and search for the Confluence HTML Macros system app.
- Expand the listing and enable the html-include (html-include-xhtml) module.
Administrators can also choose to use the allowlist to restrict URLs that can be displayed in the HTML Include macro.
Troubleshooting
- Administrators can define an allowlist of trusted URLs. If a URL is not in the allowlist, you will see an error message in the HTML Include macro.
- You can only use the HTML Include macro for pages with absolute links. If you use the macro to include an HTML page that has relative links, you will see a ‘Page Not Found’ error. See CONF-6567 — Getting issue details. STATUS .
Other ways to add this macro
Add this macro as you type
Add this macro using wiki markup
This is useful when you want to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.
Macro name: html-include
Macro body: None.
- Go to + (Insert more content) > Other macros