How to Install a Local SSL Certificate in macOS
If you’re encountering issues with your app when trying to access it using HTTPS and receiving a warning even though you have created a local certificate, it’s likely because the browser doesn’t trust local certificates by default. Don’t worry, we can fix that by installing the certificate. This guide will walk you through the steps to install a local SSL certificate in macOS.
Note: This guide assumes you are using Chrome for the installation process.
Click on the “Not Secure” box located near the address bar in Chrome. A panel will appear.
Click on the “Certificate” item within the panel. Another panel will appear, displaying the certificate details.
Drag the certificate icon from the panel to your desktop or any other desired folder. Simply use your mouse to perform the drag and drop action.
Locate the certificate file in the Finder and double-click on it.
A prompt will appear asking you to install the certificate.
When prompted, select the “System” option instead of “login” from the “Keychain:” dropdown menu.
Click “Add”. The certificate should now be visible in the System keychain, listed as “localhost”.
Double-click on the certificate in the System keychain. A window will appear.
Click on the arrow next to Trust. You should see a window where you need to change the option for “When using this certificate” to “Always Trust”.
Close the Keychain app (
cmd-Q
) and try reloading your Chrome tab. It should now work without any warnings.
Congratulations! The local SSL certificate is now installed and should work across any browser you use.
Tags: macOS, SSL certificate, local certificate, HTTPS, Chrome, Keychain