SSL certificates created by MAMP are not working in Chrome. I'm getting a "Not secure" issue.
Is there a workaround for this?
SSL certificates created by MAMP are not working in Chrome. I'm getting a "Not secure" issue.
Is there a workaround for this?
**NOTE: Since I posted this, Google have acquired the .dev
top level domain, so it's not advised to use .dev
hostnames for your local development. I use *.dv
now. When reading this answer, please replace .dev
with .test
or something else when recreating the steps in your own project. Use of .local
is not advised **
Chrome now requires SSL certificates to use the "Subject Alt Name" (SAN) rather than the old Common Name. This breaks self-signed certs previously generated by MAMP.
Fortunately, the workaround is pretty straightforward.
Here are all the steps from the very first moment of setting a host to be SSL in MAMP Pro. If you previously created SSL certificates in MAMP, then I've found that deleting them and starting again using this method works.
Create your hostname, eg. test.dev
and select your document root
Click the SSL tab, and check the "SSL" box. Make sure you leave the other checkbox "Only allow connections using TLS protocols" unchecked.
/Applications/MAMP/Library/OpenSSL/certs/
.crt
file that is highlighted - it should be named like your host, eg. if your host is test.dev
then your certificate file will be test.dev.crt
. This should open Keychain Access and you should see the new certificate in there.https
in the browser
bar.I followed the answers. What worked for me was setting the port number to 443 in the general tab
If the solution above doesn't help, go to chrome://flags look for "Allow invalid certificates for resources loaded from localhost" and enable it, restart Chrome and you should be good to go.
For those that are still having issues, try using port 8890
. The default MAMP ssl port is 8890
so visit https://test.dev:8890
. Worked for me.
For me, it wasn't necessary to use MAMP Ports but instead they were kept at Apache defaults. I also didn't need to specify port 443. What did help once I created the self-signed cert was to install the certificate icon that shows in Chrome into my Mac Keychain by dragging the image to the desktop and double-clicking it. Once it's installed into the Mac Keychain, you can set it to trust the cert.
Refer to this illustrated answer: https://www.accuweaver.com/2014/09/19/make-chrome-accept-a-self-signed-certificate-on-osx/