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:

  1. Error rendering macro 'includeplus'

    User 'anonymous' does not have permission to view the page with ID 993925286.

  2. Choose HTML Include from the External content category.
  3. Enter the URL you want to display.
  4. Choose Insert

You can then publish your page to see the macro in action. 

Change the macro parameters

Error rendering macro 'excerpt-include'

User 'null' does not have permission to view the page.

Here's a list of the parameters available in this macro. 

ParameterRequiredDefaultDescription
HTML Page's URL
(url
YesNoneThe URL of the page to include.

Error rendering macro 'excerpt-include'

User 'null' does not have permission to view the page.

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

    Error rendering macro 'excerpt-include'

    User 'null' does not have permission to view the page.

  2. Select System from the drop down and search for the Confluence HTML Macros system app.
  3. 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

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 993925310.

Add this macro using wiki markup

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 1003131187.

Macro name: html-include

Macro body: None.

{html-include:url=http://www.example.com}
Last modified on Oct 6, 2021

Was this helpful?

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