# Discourse embedding error: Failed to execute postMessage on DOMWindow

**URL:** https://meta.discourse.org/t/discourse-embedding-error-failed-to-execute-postmessage-on-domwindow/111567
**Category:** Support
**Created:** [March 14, 2019, 10:22am UTC](https://meta.discourse.org/t/discourse-embedding-error-failed-to-execute-postmessage-on-domwindow/111567 "2019-03-14T10:22:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![marekgregor1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marekgregor1/32/133636_2.png) [@marekgregor1](https://meta.discourse.org/u/marekgregor1)
#### Post date: [March 14, 2019, 10:22am UTC](https://meta.discourse.org/t/discourse-embedding-error-failed-to-execute-postmessage-on-domwindow/111567/1 "2019-03-14T10:22:55Z")

</div>

Hi,

I have the problem with embedding Discourse for our blogs, e.g. in post [Is the latest Intel vulnerability dangerous for SCADA and MES servers?](https://d2000.ipesoft.com/blog/intel-spoiler-vulnerability-should-we-fear/)

Discourse is running on [https://community.ipesoft.com](https://community.ipesoft.com) behind reverse proxy.  
Javascript error:  
`Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://community.ipesoft.com') does not match the recipient window's origin ('https://d2000.ipesoft.com').`

I followed the [setup tutorial](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963) and also [similar support topic](https://meta.discourse.org/t/failed-to-execute-postmessage-on-domwindow-the-target-origin-provided-does-not-match/77260) but without success.

My Configuration:

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/e/cea9d7b72329b929d2aed787e9c16cc4bf100445.png)  
 ![image](https://global.discourse-cdn.com/meta/original/3X/a/6/a64f441d02e9d48126c657ec1ba0229d4649fab7.png)  
 ![image](https://global.discourse-cdn.com/meta/original/3X/2/8/28720adfee28f71534dc225102f92006e8b1a1ba.png)

thanks for any help, 2 days passed on this issue without result till now.

---

<div class="post-metadata">

### Author: ![marekgregor1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marekgregor1/32/133636_2.png) [@marekgregor1](https://meta.discourse.org/u/marekgregor1)
#### Post date: [March 14, 2019, 1:48pm UTC](https://meta.discourse.org/t/discourse-embedding-error-failed-to-execute-postmessage-on-domwindow/111567/2 "2019-03-14T13:48:49Z")

</div>

Problem is solved!

The issue was in missing DNS record in discourse docker instance to blogging domain (in my case [d2000.ipesoft.com](http://d2000.ipesoft.com)).

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 13, 2019, 1:48pm UTC](https://meta.discourse.org/t/discourse-embedding-error-failed-to-execute-postmessage-on-domwindow/111567/3 "2019-04-13T13:48:56Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
