Certificate is invalid for localhost in Chrome

English 简体中文 Tiếng Việt
Summary

Developers often encounter certificate errors when running HTTPS services on localhost in Chrome, as the browser flags these self-signed certificates as untrusted. To bypass this security restriction for trusted local development environments, a simple workaround involves enabling a specific Chrome configuration flag. Navigate to chrome://flags/#allow-insecure-localhost in the browser, activate the 'Allow insecure localhost' option, and then relaunch Chrome to apply the change, resolving the certificate validation issue.

When running some localhost HTTP server with HTTPS configured, there might be some problem opening the localhost page on Chrome browser due to security concern.

When checking on the reason, it would tell that the certificate is not trusted.

If you are sure that the localhost is some service you are testing, you can workaround this restriction by changing the Chrome config flag.

chrome://flags/#allow-insecure-localhost

Type above in browser address bar and Enable the flag.

Thereafter relaunch the browser and you should see it works now.

CHROME CERTIFICATE HTTPS LOCALHOST ELASTICSEARCH

  RELATED

  COMMENTS

2
Anonymous
Nov 5, 2023 at 10:58 pm

this is not working in crome 119... guide

Anonymous
Nov 7, 2023 at 5:01 am

Same problem here. Any help?