# JavaScript embed won’t display embed, console log shows: Failed to execute postMessage on DOMWindow…

**URL:** <https://meta.discourse.org/t/javascript-embed-won-t-display-embed-console-log-shows-failed-to-execute-postmessage-on-domwindow/169374>\
**Category:** Support\
**Created:** [November 5, 2020, 8:58pm UTC](https://meta.discourse.org/t/javascript-embed-won-t-display-embed-console-log-shows-failed-to-execute-postmessage-on-domwindow/169374 "2020-11-05T20:58:52Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![seeminglee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/seeminglee/32/199310_2.png) [@seeminglee](https://meta.discourse.org/u/seeminglee)\
**Post date:** [January 14, 2021, 12:16pm UTC](https://meta.discourse.org/t/javascript-embed-won-t-display-embed-console-log-shows-failed-to-execute-postmessage-on-domwindow/169374/19 "2021-01-14T12:16:09Z")

</div>

@willywongi You might be confused about what my issue was, so let me explain what happened.

1. I’ve followed the steps but couldn’t get the comments to be embedded on the site.
2. Turns out my Discourse app (installed on a different domain) is not able to “verify” that my blog posts exist because my main site did not implement the HEAD method on those URLs.
3. After implementing handler for HEAD requests for those paths, the embed works.

To see if you have the same issue as I do, run curl against the URL that contain the blog post / wherever you want your comment embed to appear.

For example, if your URL is `https://example.com/blog/awesome-post`, go to terminal and run

```plaintext
curl https://example.com/blog/awesome-post -I

```

This will run a HEAD request to that URL and give you the result. If the status code is anything other than `200` (that’s the number on the first line of the response), e.g.:

```plaintext
HTTP/2 200

```

then the server doesn’t implement the HEAD method (OR it has issue responding to it).

If the response IS 200 then the embed issue has nothing to do with HEAD requests.

---

_[View the full topic](https://meta.discourse.org/t/javascript-embed-won-t-display-embed-console-log-shows-failed-to-execute-postmessage-on-domwindow/169374)._
