Here's what to know when generating and using a self-signed certificate to test HTTPS in a local dev environment.
What a self-signed certificate is
It's a certificate signed by the issuer itself rather than a public certificate authority (CA). Since this issuer isn't registered in a browser's trust store, connecting triggers a warning like "Your connection is not private."
Why it doesn't belong in production
Showing visitors a security warning every time erodes trust on its own, and getting users into the habit of clicking past browser warnings makes a real man-in-the-middle attack harder to notice. A live service should use a real CA-issued certificate โ a free one from Let's Encrypt, for instance.
Using it without warnings in local dev
Registering the generated self-signed certificate directly into your OS or browser's trust store (macOS Keychain Access, Windows Certificate Manager, etc.) removes the warning in your local environment. A tool like mkcert automates that registration step.