Self-signed SSL certificates not working with MAMP and Chrome

When enabling SSL on your MAMP local host, Chrome warns you that your connection is not private, throwing a NET:: ERR_CERT_AUTHORITY_INVALID.

Although you could just bypass the warning, there is a fix for this!

1. Create your host and enable SSL

Créer un hôte avec MAMP et activer SSL

2. Open the location of the certificate

No need to look for it: go to the SSL tab of your host and click the first arrow. It will bring you directly to the .crt file in the Finder.

MAMP Pro - Onglet SSL

3. Add the certificate

Open the .crt file. Keychain Access asks you to add it, take the default action. Then, find the certificate in Keychain (by searching for your host name) and open it.

Within the Trust group, select Always trust.
You will have to validate this action by entering your password.

Gestion du certificat

You can now reload your page:

localhost en HTTPS avec MAMP Pro

If the issue persists, try to reach chrome://flags/ in the Chrome address bar, then enable Allow invalid certificates for resources loaded from localhost.
You may have to reload your browser for this change to take effect.