# Failed to execute 'postMessage' on 'DOMWindow'

**URL:** https://meta.discourse.org/t/failed-to-execute-postmessage-on-domwindow/296690
**Category:** Support
**Tags:** embedding
**Created:** [February 26, 2024, 12:07am UTC](https://meta.discourse.org/t/failed-to-execute-postmessage-on-domwindow/296690 "2024-02-26T00:07:41Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [February 26, 2024, 4:01am UTC](https://meta.discourse.org/t/failed-to-execute-postmessage-on-domwindow/296690/4 "2024-02-26T04:01:55Z")

</div>

> [@Joseph3](#):
>
> Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘’) does not match the recipient window’s origin (‘’).

This is a fairly common error: [Search results for 'Failed to execute 'postMessage' on 'DOMWindow'' - Discourse Meta](https://meta.discourse.org/search?expanded=true&q=Failed%20to%20execute%20%27postMessage%27%20on%20%27DOMWindow%27). It’s a long shot, but one possible cause of the error is not having filled out the “Username for topic creation” setting that’s found on the Discourse embedding settings page.

> [@Joseph3](#):
>
> I believe it may have to do with my forum and articles being on separate machines.

That shouldn’t cause a problem.

Something that can cause issues is if your Discourse site is private: [Embed Discourse comments on another website via Javascript](https://meta.discourse.org/t/embed-discourse-comments-on-another-website-via-javascript/31963#embedding-comments-from-a-private-site-9).

---

_[View the full topic](https://meta.discourse.org/t/failed-to-execute-postmessage-on-domwindow/296690)._
