How can I disable HTTPS on Nginx?

Hi, there.
My domain is: nnuteachskill.com.
I followed steps on https://certbot.eff.org/#ubuntutrusty-nginx and https://cloud.digitalocean.com/support/suggestions?article=how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04&i=5cd736&page=0&query=let%27s%20encrypt to configure HTTPS for my site. And now I’d like to make it back to HTTP. Even I comment configuration in Nginx and delete certificate folders, it still remains redirecting to HTTPS and get error. How can I do this? Thank you very much.

My operating system is (include version): Ubuntu 14.04 + Nginx

As part of the guide you posted, you set up a redirect from HTTP to HTTPS for your site, using a 301 permanent redirect. This redirect may have been cached by your browser, which would cause any further requests to the same URL to be redirected to HTTPS as well. Deleting your browser cache will solve this issue. Users who have not previously visited your site would not be affected by this. If instructing your users to delete their cache is impractical, I would recommend continuing to serve HTTPS for a while, even if it’s just to serve a redirect back to HTTP.

The guide you linked also has a section on HTTP Strict Transport Security (HSTS). With this mechanism, a site can send a Strict-Transport-Security HTTP header to instruct browser to always use HTTPS when requesting a site on your domain. If you have enabled this header, you will need to manually delete your site from your browsers HSTS list (the instructions for this depend on your browser - the search engine of your choice should help if you search for something like " clear HSTS"). This mechanism is separate from your browser cache - in other words, merely clearing your browser cache will not be enough. If you’ve been serving that header to your visitors for some time, you should probably continue to support HTTPS for a time and send a HSTS header with max-age=0; to gradually disable HSTS for all your visitors.

1 Like

Thank you very much. That really helps a lot and the problem is now solved. Happy coding :blush:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.