Include HTML file in a Confluence page

Is it possible to include an HTML file in a Confluence page using the html-include macro?

I've configured the macro as follows:


and tried to configure the whitelist entry for that location as follows:


but I'm still getting the message:

Could not access the content at the URL because it is not from an allowed source.


Configure whitelist >>

Any ideas what I'm doing wrong?

5 answers

1 accepted

This widget could not be displayed.

It seems there are issues linking to local files in Confluence. See

I resolved the issue by setting up a local web server that can host the content using another protocol which won't trigger this error as suggested in the above link.

This widget could not be displayed.

I don't think you can use the file protocol with this. That makes sense -- for a different user on a different computer, it would point to a different file.

(From the error message you get, it also might be that the whitelist needs to be configured for your Confluence instance -- you need to be a Confluence admin to do that. However, my whitelist is configured to allow anything, and the file protocol still doesn't work for me.)

This widget could not be displayed.


You can use Confluence a your file directory. You just need to drop the file in the <install-folder>/confluence that way you should be able to get this file from Confluence.


I've tried all sorts of permutations and I just can't get this to work. Please can you elaborate.

In order to simplify this I've added a file to the Confluence install folder and tried using the HTML macro.

{html}<a href="file:///<path-to>/file-name.html> </a>{html}
I can open the file I'm pointing to in Chrome.
This widget could not be displayed.

You can use the HTML Macro from HTML for Confluence - it allows you to have the HTML source come from the file system.

It shouldn't be necessary to install this in order to achive what I want to though should it? We don't allow exernal access to Confluence and the html files I want to diplay are on the company network.

This widget could not be displayed.

Hello All,

My use case is to allow HTML tags to be executed and rendered (like tables) but not to execute any JS/CSS. Is there a to implement it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

460 views 6 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you