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.

2. You will find this option in AMP option panel -> Settings -> Comments -> Enable Disqus option.

3. 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 setups, 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: 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

Back to you

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

That’s it for this tutorial!

We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.

Ask your Questions Directly!
If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!
Updated on June 25, 2019

    Are you still looking for a solution?

    Then fill out the below form and we will reach out to you within a few hours.

    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 ?

    2. If I create a new sub domain then if someone post the comment by mobile (on amp version) then is it visible on non-amp version?

      I mean can we see amp( comments on non-amp version (

      1. Hi Dharmendra,

        Will you please tell us are you talking about WordPress default comments or Disqus comments?

        1. I am talking about disqus comment because I have checked WordPress comment there showing the all the comments AMP to Non AMP or vice versa.

          1. Hi Dharmendra,

            The Disqus comments will be different in non-amp and AMP versions Not like the WordPress comments and if you have issue/problem then contact our technical team – they will help you as soon as possible.

    Leave a Comment