57

I know that my SSL certificate for localhost is not valid. I know my connection isn't actually secure. I don't care! I'm talking to my own machine.

How can I tell Chrome to ignore certificate errors on localhost?

enter image description here

6
  • 4
    Simplest way just place the certificate into the oeprating system's Certificate Store. This way the certificate WILL BE trusted by your operating system. If you use Firefox you have to setup Firefox to also trust the certificate since Firefox uses it own certificate store not the host operating systems certificate store. Having no luck finding a question that does a good job of explaining how to do this at this time. – Ramhound Jun 24 '14 at 12:35
  • 1
    @Ramhound Adding the certificate to my certificate store has no impact on the issue because the certificate does not match the URL no matter how hard I trust it. So, yeah, I could issue myself a different certificate, add it to the store and use that in the application. But I hope that is not the only to get around this warning and that wasn't my question anyway. – Der Hochstapler Jun 24 '14 at 12:50
  • 1
    Simply stated you can't tell Chrome to ignore certificate errors on just localhost. You can tell Chrome to ignore all certificate errors but that would be extremely unwise. – Ramhound Jun 24 '14 at 12:54
  • @Ramhound That would be disappointing, but I feared as much. – Der Hochstapler Jun 24 '14 at 12:55
  • I won't even get into how Chrome handles certificate revocation. Chrome is a cross-platform application to Google. Google is not doing the internet a service with some of its choices in order to acomplish their cross-platform goals. – Ramhound Jun 24 '14 at 13:02
86

There is now a flag for this at chrome://flags/#allow-insecure-localhost.

enter image description here

We've used this for a while, but have since moved to using a proper certificate that is issued to a subdomain we own. That subdomain has an A record that points to 127.0.0.1 and a AAAA that points to ::1.

However, Chrome seems to have an issue with that DNS setup and randomly throws DNS related errors. So you'd want to add the mapping manually to the hosts file as well.

That's what we do right now and it works great.

2
  • Don't forget to restart your browser for the flag to take effect! – Bugs Bunny Jul 28 '20 at 23:09
  • This also works on Edge – NotAPro Feb 25 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.