It’s November 2022 and I insist on having comments on my professional blogs, even though nobody really cares. In 2021 I began migrating comments away from Disqus (which I dislike for various reasons) towards Discourse. With Discourse, I embed a topic into each blog post, so that each post corresponds to a Discourse topic. Discourse creates a topic for each post and the comment thread of the topic becomes the comment thread of the post. Nice.

Symptom

Today I was rudely greeted with an HTTP/404 response in the spot on a blog post where comments should appear. In my browser, that showed up as a sad face.

Problem

Discourse did not allow embedding from the domain I was visiting.

Solution

Tell Discourse to allow embedding from all the domains that you use for your site/blog/whatever.

As of November 2022, you’ll find the setting in Discourse under Admin > Customize > Embedding. If you need more details, search the Discourse Forum about Discourse, just as I do every time I need to look something up about Discourse.

Why the Problem Was a Problem

My programming-focused blog can be found at https://blog.thecodewhisperer.com, but also at https://www.thecodewhisperer.com and even at https://thecodewhisperer.com. I need to do one of two things:

  • Change the HTTP redirect response code to forward the requester (change the address in the browser’s address bar) on to the canonical subdomain blog. or
  • Add all these domains to the “allow list” for embedding (with the same settinngs).

I chose the latter, even though I don’t love the duplication. I would be thrilled if Discourse added the feature of applying the same “embed allow list” settings to a colletion of domains, but I don’t have the energy to do that today.

Enjoy!