Embed my Discourse Forum as IFrame

AI-generated summary

kOS is seeking a step-by-step guide on how to embed certain topics from their Discourse forum as an iframe on another website. NateDhaliwal suggests using simple HTML with the forum’s URL as the src attribute, and also provides a link to a guide on embedding comments and replies.

However, Tris20 advises against embedding Discourse topics as iframes, citing potential issues and quotes Sam Saffron stating that Discourse is not designed to run in an iframe.

Alternatively, merefield suggests integrating custom web pages into Discourse itself, and provides a link to the Landing Pages plugin. pfaffman mentions the allowed_iframes site setting, and kOS notes that they found a setting that needs to be added to allow their forum to be iframed.

Hi guys, so I have been googling, searching, researching and thinking about this… What I’ve found confuses me. So I am now asking you, esteemed Discourse Enthusiast, to explain to me, as if I were a 10 year old child, how to embed certain topics from my forum as an iframe on another website. A step-by-step guide without any derailments, please.

For example, let’s say I want to embed THIS topic here on another website as an iframe.

Thank you very much, I hope this clears up the fog for me :-).

Perhaps some simple HTML?

<iframe src='discourse.example.com'>
</iframe>

Just change the src part to your forum’s URL.

If you’re looking to embed comments and replies though, check this guide out:

See also the allowed_iframes site setting.

Hi guys, quick update. Ive found a setting that needs to be added from the console, that allows my forum to be iframed, in general. I was in a rush, and havent stored the docs to it. Please remind me to post it here if you are looking for a similiar answer.

Just as an FYI, embedding Discourse as an Iframe in another platform isn’t a good idea. The comments thing is fine, but actually embedding the topic leads to a bunch of headaches. I think I even managed to achieve a recursion at some point :sweat_smile:

For reference, I was using the bot on Discourse for guidance and Sam jumped in with the following:

Maybe a published page as an iframe would be ok, but otherwise I would avoid doing this,

There are solutions to integrate arbitrary custom web pages in Discourse itself (instead of the other way around)

Take a look at this:

We can’t offer support outside a contract, but if you have budget, we can help you.