MervCodes

Tech Reviews From A Programmer

[Google Chrome Developer Tip] Prevent Warning 'Your connection is not private'

2 min read

This is probably more applicable to web developers. Many times when we try to run a localhost site with https in Google Chrome, we get the dreaded "Your connection is not private" warning. This can be incredibly frustrating when you're in the middle of development and need to test HTTPS-related features.

The Quick Fix

There's a hidden feature in Chrome that most developers don't know about. When you see the "Your connection is not private" error page, simply type the following on your keyboard:

thisisunsafe

Yes, just type it. There's no input field -- you literally type it while looking at the error page. Chrome will immediately proceed to the site.

A More Permanent Solution

If you want to permanently allow localhost connections with self-signed certificates, you can enable a Chrome flag:

  1. Navigate to chrome://flags/#allow-insecure-localhost
  2. Set it to Enabled
  3. Relaunch Chrome

This tells Chrome to always allow invalid certificates when the site is being served from localhost. This is perfect for local development with tools like webpack-dev-server, Vite, or any framework that serves over HTTPS locally.

Why Does This Happen?

Chrome enforces HTTPS certificate validation strictly. When you run a local development server with a self-signed certificate, Chrome rightfully flags it as untrusted because no Certificate Authority has vouched for it. While this is excellent security behavior for production sites, it gets in the way during development.

Important: Never bypass certificate warnings on actual production websites. This tip is strictly for local development purposes.