Why are the wrong URLs detected for my discussions?

The first time Disqus is loaded on a page, our system creates a new discussion thread and associates that discussion with the URL of the page used during that first load.

In more advanced implementations this may not be desirable, in which case example situations and solutions are listed below.

Situations known to cause the wrong URL to be detected

Previewing pages before publishing

In this scenario, Disqus will associate that preview URL with the discussion thread. For example, say a publishing environment uses www.samplesite.com for its public-facing site and preview.samplesite.com for previewing pages before publishing. If Disqus is loaded in the preview environment, discussion threads will be associated with the preview.samplesite.com domain.

To fix already-affected discussions, see How can I update discussion URLs?

To prevent this from happening further, either:

  1. Prevent Disqus from loading in the preview environment; or,
  2. Set the disqus_url variable upon thread creation.

Setting the wrong disqus_url variable

To fix already-affected discussions, see How can I update discussion URLs?

Thread URLs cannot be updated by passing `disqus_url` after a thread has been created. `disqus_url` can only be set once, upon thread creation.

Did you find this article helpful?