HTML Include Macro

Still need help?

The Atlassian Community is here for you.

Ask the community

The HTML Include macro allows you to include the contents of an external HTML file (a webpage) in a Confluence page.

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.

Using the HTML Include Macro

To insert the HTML Include macro into a page:

  1. In the Confluence editor, choose Insert > Other Macros
  2. Find and select the required macro

Speeding up macro entry with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Autocomplete for links, files, macros and mentions.

To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.


Parameters are options that you can set to control the content or format of the macro output. 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).

YesNoneThe URL of the page to include.

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.

(warning) 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:

  1. Go to > Add-ons

  2. Select System from the drop down and search for the Confluence HTML Macros add-on.
  3. Expand the add-on and enable the html-include (html-include-xhtml) module.

Administrators can also choose to use the whitelist to restrict URLs that can be displayed in the HTML Include macro.


  • Administrators can define a whitelist of trusted URLs. If a URL is not in the whitelist, 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 .

Code examples

The following examples are provided for advanced users who want to inspect or edit the underlying markup for a Confluence page. 

Macro name: html-include

Macro body: None.

Storage format example

 <ac:structured-macro ac:name="html-include">
  <ac:parameter ac:name="url">
    <ri:url ri:value=""/>


Wikimarkup example


Last modified on Mar 17, 2016

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.