All Collections
What is Disqus?
How does Disqus work?
How does Disqus work?
Disqus avatar
Written by Disqus
Updated over a week ago

Disqus is a networked community platform for your website. To learn more about Disqus, read What is Disqus or visit the the Disqus website.

Get Started as a commenter Get Started as a publisher

This page intends to provide a deeper understanding of how Disqus works, both from a conceptual and a technical level. This page is written for our advanced users who are curious about the inner-workings of Disqus โ€” it's absolutely not required reading in order to use the service.

At its core, Disqus is a third party system that provides commenting and other community features. The Disqus service also acts as an intrinsic network that connects each of these enabled websites together. Disqus uses JavaScript to embed, or display, the system onto the page.

Data architecture

We use some terminology that may be unfamiliar or used differently from other services.

Comments in the Disqus backend are called posts (and will be described as such in our API documentation). Because Disqus is used with blogs and other content management systems, using "posts" leads to ambiguity, so they are called comments in the frontend or when describing to end-users.

Threads contain comments. A thread is associated with a page which has Disqus embedded. For example, a page located at http://example.com/my-blog-post.html will have one unique thread associated with that page. This thread will contain all of the comments on the page, as well as everything else that is relevant to that instance of Disqus (such as likes, participating users, and other metadata). Threads are uniquely identified by either a page-provided identifier or a URL.

A forum is a website's account on Disqus. Note that this is not the same as the user account which registered the website. A forum indicates the website's community on Disqus and is identified by the forum's shortname. Take this example if your website is located at http://example.com. Your website's name may be called My Example Website. Your forum shortname on Disqus may be myexamplewebsite.

For more terminology definitions, please read List of Terminology.

Loading Disqus

Whether websites use Disqus plugins or just manually embed the script, the system is loaded onto the page in generally the same way.

When a user visits a webpage that includes Disqus (for example, a blog post), the page makes a request to Disqus. Disqus uses the information defined on the page, called configuration variables, to locate the correct thread. Disqus will look up the associated thread and, if found, embed the correct threads with all the right comments onto the page. If an associated thread was not found, Disqus will create a new page with the data provided (again, in the configuration variables), and environment metadata such as page URL, page title, and current datetime.

When a thread is located or created, the Disqus script continues and generates the appropriate HTML, JavaScript, and CSS for your page and embeds it in the right location.

Posting to Disqus

The core of Disqus is posting comments and we strive to handle this in a smooth and secure way. Nearly all of Disqus is dynamically rendered HTML through JavaScript. However, the system makes use of iframes to directly communicate back to the Disqus servers when users post content. We use iframes to ensure security and to protect users against websites maliciously posting comments on their behalf.

When a user posts his or her comment, it is done within an iframe and sent directly to the Disqus servers. To the user, this entire experience is seamless and feels native to the website.

Further reading

This page describes how the core Disqus system works. If you'd like to learn about how comment counts are calculated and displayed, read How do comment counts work?.

Did this answer your question?