Web Integration

Getting started

Before installing Disqus, you'll first need to register a forum, if you have not done so already.

This integration guide isn’t specific to any particular platform, and assumes that you have knowledge of how your website’s system works. Some basic understanding of javascript/html is also recommended.

For many of the most popular platforms (e.g. Wordpress, Blogger, Tumblr etc.), most of these steps are unnecessary as we have integrations which do all of this for you. See our list of available integrations to find out if yours is listed.

Comments embed

The comments embed is the core Disqus experience where most users will spend their time. By putting in a snippet of code on your website, we’ll load all the necessary components for commenting experience on a specific post, article or topic.

Universal code

This is the basic drag-and-drop embed code that you can use to show the commenting embed.

Configuration variables

You can add a unique identifier, specify a link-to URL, a title (among others) to be stored with your thread. These aren't required, but are highly recommended.

Multi-lingual websites

This allows you to override the language that the embed UI displays from what you've set globally in your site settings. This is useful for multilingual websites.

Callbacks

You may attach your own javascript to certain events that occur in the Disqus embed. Most commonly this is used for tracking in your own analytics system, but can be used for almost anything that doesn't impact the user experience negatively.

Appearance tweaks

The embed inherits styles from the page it's contained in, and this article explains how that works and how you can override certain elements.

AJAX sites

This details how to reload the Disqus thread for AJAX/single-page applications without navigating to a new page.

Secure (HTTPS) sites

Disqus will automatically handle HTTPS websites out of the box with the current embed code. See this guide if you haven't updated the embed code, or are having trouble with mixed content errors.

Single Sign-On

Single Sign-On (SSO) provides a seamless log-in experience to your users by allowing users to sign in to your site and fully use Disqus without again authenticating with Disqus.

Comment counts

Comment count script

You can display a comment count link anywhere on your site to a particular discussion. This involves adding a small script and appending #disqus_thread to the end of your href links.

 

Best practices

  • If you're using Disqus outside of a publicly-accessible environment, see our guide on Best practices for staging, development and preview sites
  • If using configuration variables with the embed, set them before loading the page. None of the data you give these variables will apply after the thread is created, so they need to be present before the page is loaded for the first time.
  • Setting a trusted domain in your Disqus admin settings will ensure that no other websites can use your Disqus shortname. Make sure you include all possible domains that you might load the Disqus embed on, or else you'll block yourself.
  • We recommend Reseting and Archiving Large Threads when a discussion on your site grows larger than 1,000 comments. Large threads present some user experience issues, and can be avoided by configuring your automatic close setting.

Troubleshooting

Why is Disqus loading slowly when I do site performance tests?

I've installed Disqus on my website but it isn't loading

Why are the wrong URLs detected for my discussions?

Why is my page so wide in Internet Explorer?

Troubleshooting Disqus in Internet Explorer 8/9/10

Why are the same comments showing up on multiple pages?

Why are comments visible in the Disqus admin but not on my site?

Ask the Community Contact us

Still need help? Discuss Disqus is our most active place for getting quick help, sharing feedback, and discussing issues with others – a knowledgeable and helpful support team and community are there right now. Our 101 post is the best place to get started.

Make sure to search our Knowledge Base first... your answer might be just a click away!