I accidently configured a web-app to force a secure connection i.e. https, and although I have turned this off, I cannot get chrome to forget this error, so whenever I ask for the url of my local development server;


Chrome instead returns


and gives the error

This site can’t provide a secure connection

I have tried Chrome/Clear Browsing data and this does not help. The app uses ruby on rails and the secure connection was done by setting config.force_ssl = true.

How do I fix this?

  • 2
    Out of curiosity, does the same thing happen when using a different browser (e.g. Firefox, Safari)? I'm asking to see if it's an issue with Chrome or perhaps http/https redirection on the app Dec 28, 2016 at 22:42
  • Exactly how did you configure your app to force a secure connection? Did you use a HTTP redirect? - If so, was it 301, 307, or? - Or did you use HSTS to force a secure connection? If so, with which parameters? - The answers to these questions are necessary in order to determine what you need to do to solve your problem.
    – jksoegaard
    Dec 28, 2016 at 22:52
  • It is a ruby on rails app, and I put in the configuration file ``` config.force_ssl = true```. if you look here, stackoverflow.com/a/39476254/1299362, you can see that it does quite a lot. I can see why jsoegaard asked how it was configured, quite a lot happens. I will edit the question to include this information.
    – Obromios
    Dec 30, 2016 at 4:26
  • Dials Mavis, it affects Firefox and Safari, but just resetting the cache fixes it for those browsers.
    – Obromios
    Dec 30, 2016 at 4:26

4 Answers 4


As this is only your development site on localhost, and not a real domain name, you can solve the problem in Chrome by opening the following URL:


You must open this URL in Chrome.

From there you get the settings for HSTS (HTTP Strict Transport Security). Then under "Delete domain" put in localhost and delete it from the list.

If you have used other local names than localhost to refer to your development setup, delete those as well.

  • 2
    Tried deleting localhost, localhost:3000,,,,, all to no avail.
    – Obromios
    Jan 2, 2017 at 2:21
  • 2
    deleting localhost and also clearing chrome://history/ did it for me Apr 13, 2017 at 16:24
  • great solution!
    – saulyasar
    Mar 21, 2022 at 8:14

I always find adding a fake query string after the URL refreshes the cache for me.

e.g. http://localhost:3000/?fake=true


For me the solution was to use http rather than https


I ended up going for the nuclear option, uninstalling chrome and using this post to delete all my google-chrome data. It worked. Note that just uninstalling chrome did not work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .