Getting a Self-Signed SSL Cert to Work Locally with Chrome and MAMP

These days websites and apps must use HTTPS for a number of reasons. To develop locally with SSL you must create a self-signed certificate and then tell the browser to trust it.

Create a local self-signed certificate in MAMP

  • Click on a host from the Hosts page.
  • Go to the SSL tab.
  • Tick the SSL checkbox.
  • Click the Create self-signed certificate button.
  • Enter 01 into the Country code field.
  • Click the Generate button and save the file to a location with other project assets.
  • Tick the https connections must use TLS protocols checkbox.
  • Click the Save button. Restart the servers.

Download the local certificate

  • Open the local https URL to the host in the Chrome browser. You should get the Your connection is not private message screen.
  • Right-click the Not Secure icon in the URL bar.
  • Select Certificate. This should open a window with self-signed certificate info.
  • Click on the certificate image and drag it to your desktop.
  • Click the Ok button to close the cert window.

Import the Cert into the Keychain

  • Open Keychain Access in Chrome by going to Settings > Advanced > Privacy and security > Manage certificates.
  • Select System under Keychains.
  • Drag the cert from the desktop into the main window. You may need to enter your password. The new cert should appear in the list.
  • Double-click the cert in the list to open the cert window.
  • Click the Trust dropdown.
  • In the dropdown box next to the label When using this certificate: select Always Trust. All other drop-downs in the window should update.
  • Close the cert window. You may need to enter your password and click Update Settings. The cert should now be trusted and show as much in the window.

Refresh Your Local Site