Note that it is not possible to retroactively set a trusted domain on existing threads. The domain will only apply to newly created threads.
Setting a trusted domain
Go to your Disqus Admin > Setup > Advanced. Locate the "Trusted domains" box and enter your domains there.
Best practices and troubleshooting
Sub-domains are unnecessary, as everything is covered in the base domain. So using
wwwin your trusted domain, or else your comments may not load.
As part of the Best Practices for staging sites you can use the trusted domain as a check to make sure you don't load accidentally load a production Disqus shortname on a staging site and vice versa.