1. Home
  2. How To
  3. How to Host Disqus Comments on your own servers in AMP for WP

How to Host Disqus Comments on your own servers in AMP for WP

The goal of this tutorial is to modify the https server, which presently is set to our secure API, but if you follow this tutorial, you will be able to host it through your domain.

Please follow the following steps:

1. Switch off the option that is highlighted in the below screenshot, that will turn off the hosting from our secure API to your website.

Host disqus

2. Now let’s create a new host file from your HTTPS server. You will be presented with this option to enter your host file URL(which should be over HTTPS server).

For that, you need to create a subdomain on your website which you can do it from your Cpanel and you need to make sure that the subdomain also has the https installed.

Once you have both setup, you need to create a new file in that subdomain folder with the name “disqus.php”. In that file, you need to place some code that is required by the Disqus, which you can find in the below gist.

Once you have created and added the code, then you must upload that to the server and now you will have a URL like: https://comments.example.com/disqus.php. If you are trying to open that URL and it return the blank screen then don’t panic. Just proceed with the article.

Then go to the options and paste that URL into the field with the name “Disqus Host File” like the below screenshot.

Disqus host file

Now, check your website article, it should have the Disqus comments installed.

Links to more resources for Disqus:

Disqus in AMP by Tomasino Labs

Disqus installation by Official AMP Project

Disqus Blog post by Disqus.com

Back to you

I really hope it helps you. Let us know your thoughts in the comments below.

Updated on November 4, 2017

Was this article helpful?

Related Articles


  1. whats the requirement of setting up a new subdomain ? can it not be done on an existing sub domain ?

Add A Comment