Make your self-signed certificate trusted by Chrome
When you are getting tired of that warning you get for your self-signed certificates when running your site locally you should add your certificates to your trusted certification store.
These instructions are for Windows and works for me™ in Chrome 60.
Create a self-signed certificate with a DnsName
Create a new certificate with powershell "New-SelfSignedCertificate -DnsName localhost -CertStoreLocation cert:\LocalMachine\My". The DnsName is important and if you use a custom domain via a host file you should add the domain you use there.
Make sure you use this certificate on your localhost
Export the certificate from Chrome
- Go to your localhost website and open up the inspector
- Under the security tab, click the "View Certificate" button.
- Go to the details tab in the dialog and click "Copy to file"
- Follow the wizard and choose the Cryptographic Message Syntax Standard - PKCS #7 (i do not think the "Include all checkbox" is important)
- Save it somewhere.
Import the certificate to the "Trusted Root Certification Authorites"
- Go to Chrome Settings
- Click advanced at the bottom
- Click the Manage Certificates link to open the certificate dialog
- Click import
- Follow the wizard and pick your exorted certificate file
- Click browse and choose "Trusted Root Certification Authorites"
After this you should restart Chrome and you should not get any warnings.
All this information was collected at various places in this Stack Overflow question: https://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate