Best practices for staging, development and preview sites

The content you store on Disqus should be properly sandboxed if your site is using a staging, testing, development or preview site which emulates live content. These are some tips on how to ensure that invalid data doesn't leak onto your live site.

Use a neutral Disqus account when registering forums

This is a normal Disqus account controlled by your company or organization, which can be easily transfered as different members of your company or organization take on administrative duties within your Disqus forum.

Also, certain account aspects, such as API applications, can't be transfered and would have to be recreated.

Register Multiple Shortnames

Each shortname is sandboxed from the other and you can use that to keep test data away from the live site. For example, if you had the shortname gotham installed on http://example.com/, and you have a staging site at http://staging.example.com/, register and use the shortname staging-gotham for that server.

Note: There is no limit to the number of shortnames an account can register.

Never use your live Disqus shortname on inaccessible pages

Everything that's created on Disqus is publicly accessible, and can show up in widgets, API feeds and discovery once created. To ensure that only the right data gets aggregated to these channels, make sure you're never referencing the same shortname on the live site. This includes:
  • Previews or drafts of articles before they are published
  • Staging, testing or development sites
  • On private or sensitive sections of a website

Test imports on different shortnames

When importing data for testing purposes, it's best to try this on one of your test shortnames first. This allows you to correct any errors that you might see with the data integrity by simply creating a new shortname, and won't conflict with any of your live data.

Did you find this article helpful?