
Embedding Confluence content into your website or application is easier than you think. You can use the Confluence Embed HTML feature to add Confluence pages, blog posts, or even entire spaces to your site.
To get started, you'll need to generate an embed code from your Confluence instance. This involves copying a unique URL that will be used to display the content on your website. The embed URL is generated based on the Confluence page or space you want to embed.
The embed code can be customized to fit your website's design and layout. You can adjust the width, height, and other parameters to ensure the embedded content looks seamless with your site.
See what others are reading: How to Get Url of Image for Html
Getting Started
To get started with embedding HTML in Confluence, you need to enable the HTML Macro. This can be done by heading to Settings → Aura → Configuration and toggling the HTML (iframe) macro to enabled.
To insert the Macro, you can either click the "+" button while editing your Confluence page and choose Aura HTML (iframe) from the list of macros, or use the shortcut “/” to access it.
You might enjoy: How to Center an Iframe in Html
The Macro allows you to customize settings to fit your needs, such as specifying the URL or code to embed, adjusting dimensions, and tweaking other parameters.
Here are the key steps to follow:
- Enable the Macro by heading to Settings → Aura → Configuration and toggling the HTML (iframe) macro to enabled.
- Insert the Macro by clicking the "+" button while editing your Confluence page and choosing Aura HTML (iframe) from the list of macros, or using the shortcut “/” to access it.
- Configure the Macro to fit your needs by specifying the URL or code to embed, adjusting dimensions, and tweaking other parameters.
By following these simple steps, you'll be well on your way to enhancing your Confluence pages with dynamic content and interactive elements.
Related reading: B Tag in Html
Understanding Aura
Aura is a powerful tool that lets you embed custom HTML, CSS, and JavaScript directly into your Confluence Cloud pages. It's perfect for integrating websites like Calendly bookings in a visually appealing way.
To use the Aura HTML (iframe) macro, you need to enable it first. This can be done by heading to Settings → Aura → Configuration and toggling the HTML (iframe) macro to enabled.
The macro is easy to use: you can insert it by clicking the "+" button, choosing Aura HTML (iframe) from the list of macros, or using the shortcut “/”. Once inserted, you can configure the settings to fit your needs.
Broaden your view: Embed Vimeo Video in Html without Iframe
The Aura HTML (iframe) macro offers several benefits. It can enhance the visual appeal of your Confluence pages, increase interactivity, and simplify complex processes by embedding tools and calculators directly into your pages.
Here are some of the key features of the Aura HTML (iframe) macro:
- Enhance the visual appeal of your Confluence pages
- Increase interactivity and engage your readers
- Tailor your Confluence pages to your specific needs
- Simplify complex processes
- Boost collaboration and teamwork
By using the Aura HTML (iframe) macro, you can create unique layouts and make your Confluence pages stand out in a positive way.
Security Considerations
Security Considerations are crucial when using Confluence embed HTML. Sanitizing HTML in the app's configuration page and checking the Sanitize box in the macro is recommended for added safety, as it prevents JavaScript from being executed.
This option loads slightly faster, but it's worth noting that unchecking Sanitize adds risk, enabling certain classes of stored XSS attacks, such as phishing for credentials in a fake login panel. You need to trust your site users to use the macro responsibly.
The sandbox iframe does not add any CORS-related headers, but AJAX requests to services you don't control may contain CORS response headers that prevent you from using them within the sandbox iframe. This can limit the functionality of your macro.
For your interest: Using Oembed in Base Html
If you try to include an iframe in an HTML macro, it won't work if the server for the source of the iframe sets the X-Frame-Options response header to DENY or SAMEORIGIN. This is a browser security issue that Appfire cannot control or bypass.
If you control the remote domain that is serving the source of the iframe, you can disable this setting on that server or build a proxy for that domain that strips the header. This can be a solution for many sites that don't want to show up in iframes for Intellectual Property or security reasons.
Additional reading: Inline Frame Example in Html
Customization and Troubleshooting
You can customize the HTML Macro to fit your needs by specifying the URL or code to embed, adjusting dimensions, and tweaking other parameters.
To ensure smooth performance, toggle the HTML (iframe) macro to enabled in Settings → Aura → Configuration.
If you encounter issues, review the live preview to catch any errors before saving your changes.
Recommended read: Confluence Html Macro
Customizing iFrames
Customizing iFrames is a crucial part of creating engaging and interactive content in Confluence. You can set a fixed height and width for your iframe to ensure that content displays properly.
To customize the iframe, you can adjust the height, width, alignment, and more. For example, you can set the height to a specific number of pixels to accommodate content that won't display properly below a certain size.
Here are some key attributes you can customize:
If the website you're trying to include isn't showing up in the iframe, try checking the website's settings or contacting the website's administrator.
Known Issues
Some websites may show up as blank when you try to include them in an iFrame. This can be frustrating, but it's not always a problem with your code.
The website administrators may have invoked the x-frame-options response header to prevent browsers from rendering it in an iFrame. This is a common security measure to prevent clickjacking.
A fresh viewpoint: Html Prevent Copy Paste

The browser you're using may also block the website from loading as a security precaution. This is usually a good thing, but it can interfere with your iFrame.
Here are some possible reasons why your iFrame might be showing a blank page:
- The website administrators have invoked the x-frame-options response header.
- The browser you're using has blocked the website from loading as a security precaution.
Enabling
Enabling the Confluence HTML macro requires some careful consideration. You'll need Confluence Administrator or System Administrator permissions to make this happen.
The default setting for the HTML macro is disabled, which is a good thing. This is because enabling these macros can make your Confluence site vulnerable to cross-site scripting attacks.
However, if you trust all your users not to attempt to exploit the macro, you can go ahead and enable it. We strongly recommend leaving this macro disabled if you allow self-signed up or anonymous users to create content.
To enable the HTML macro, follow these steps:
- Go to Administration > Manage apps.
- Select System from the drop down and search for the Confluence HTML Macros system app.
- Expand the listing and enable the html (html-xhtml) module.
Frequently Asked Questions
Can you iFrame a Confluence page?
No, you cannot iFrame a Confluence page, but you can embed a webpage inside a Confluence page or live doc using the iFrame macro. Learn how to use the iFrame macro to enrich your Confluence content.
How to embed a site with HTML?
To embed a site with HTML, use the Embed option on the Insert panel and paste your custom code into the code box. Click NEXT to preview and INSERT to add the code to your page.
Featured Images: pexels.com


