[GH-ISSUE #412] Mac - Chrome / Not Secure / Certificate is not valid #271

Closed
opened 2026-02-25 22:33:00 +03:00 by kerem · 8 comments
Owner

Originally created by @susanBuck on GitHub (Nov 1, 2021).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/412

System

Mac BigSur 11.2.1
Chrome 95.0.4638.69 (Latest version as of this writing)

Issue

I'm seeing the "Not Secure" flag in Chrome and a message that "Certificate is not valid"

image

When I click the more info icon for the "Certificate is not valid" message, it shows the following with no further indication as to what the problem might be.

image

Steps I followed to set up

  1. Created a new certificate w/ mkcert
  2. Added it to Mac's Keychain Access and made sure it was set to "Always Trust"
  3. Configured my Apache server to use the certificate/key for the site in question.
Originally created by @susanBuck on GitHub (Nov 1, 2021). Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/412 ## System Mac BigSur 11.2.1 Chrome 95.0.4638.69 (Latest version as of this writing) ## Issue I'm seeing the "Not Secure" flag in Chrome and a message that "Certificate is not valid" ![image](https://user-images.githubusercontent.com/237711/139718253-a7fe80c8-57d6-4e5c-afcb-d2c89162c994.png) When I click the more info icon for the "Certificate is not valid" message, it shows the following with no further indication as to what the problem might be. ![image](https://user-images.githubusercontent.com/237711/139717916-c267a97d-05c2-4711-8c15-dc6449358df7.png) ## Steps I followed to set up 1. Created a new certificate w/ mkcert 2. Added it to Mac's Keychain Access and made sure it was set to "Always Trust" 3. Configured my Apache server to use the certificate/key for the site in question.
kerem closed this issue 2026-02-25 22:33:00 +03:00
Author
Owner

@Mihir-Bhasin commented on GitHub (Nov 10, 2021):

I am getting the same issue in chrome.

<!-- gh-comment-id:964855406 --> @Mihir-Bhasin commented on GitHub (Nov 10, 2021): I am getting the same issue in chrome.
Author
Owner

@bilalbayasut commented on GitHub (Nov 22, 2021):

I'm getting the same issue in any browser

<!-- gh-comment-id:975291364 --> @bilalbayasut commented on GitHub (Nov 22, 2021): I'm getting the same issue in any browser
Author
Owner

@bilalbayasut commented on GitHub (Nov 23, 2021):

@susanBuck have you got it working? Any solution for this guys ?

<!-- gh-comment-id:976196569 --> @bilalbayasut commented on GitHub (Nov 23, 2021): @susanBuck have you got it working? Any solution for this guys ?
Author
Owner

@bilalbayasut commented on GitHub (Nov 23, 2021):

I solve this issue with manually importing the certs into chrome/safari : https://www.keokukschools.org/certificate-safari-chrome/ .
if you got error when importing the certs, ignore it. once you are done with the steps above, restart your mac, and it should work

<!-- gh-comment-id:976429667 --> @bilalbayasut commented on GitHub (Nov 23, 2021): I solve this issue with manually importing the certs into chrome/safari : https://www.keokukschools.org/certificate-safari-chrome/ . if you got error when importing the certs, ignore it. once you are done with the steps above, restart your mac, and it should work
Author
Owner

@andreasvirkus commented on GitHub (Jan 11, 2022):

I had to call mkcert -install first and then call mkcert localhost. This SO answer helped me solve it https://stackoverflow.com/a/57226788/2803743

<!-- gh-comment-id:1009666856 --> @andreasvirkus commented on GitHub (Jan 11, 2022): I had to call `mkcert -install` first and then call `mkcert localhost`. This SO answer helped me solve it https://stackoverflow.com/a/57226788/2803743
Author
Owner

@rpuig commented on GitHub (Apr 4, 2022):

I have a similar issue. When I installed it in windows 10, then i checked the certificate validity dates and it is as if it was creted with wrong dates . 11/11/2009 to 09/11/2019. But i have created it today and today is 04/04/2022 . Anyone knows why this is happening?

<!-- gh-comment-id:1087452451 --> @rpuig commented on GitHub (Apr 4, 2022): I have a similar issue. When I installed it in windows 10, then i checked the certificate validity dates and it is as if it was creted with wrong dates . 11/11/2009 to 09/11/2019. But i have created it today and today is 04/04/2022 . Anyone knows why this is happening?
Author
Owner

@skuppuraj commented on GitHub (Apr 8, 2022):

I am also using macOS Big Sur (11.6.5) and Apache Server with the virtual host.

I am sharing the steps I followed and installed successfully. Check if it works for you.

My local site name: example.test

I created the directory crt in the document root of the directory

Then I installed the certificate for example.test site

mkcert example.test

Then I configured the virtual host to load the certificate.

Listen 443

<VirtualHost *:443>
    DocumentRoot "/Users/[username]/Sites/example"
    ServerName example.test
    SSLCertificateFile "/Users/[username]/Sites/crt/example.test.pem"
    SSLCertificateKeyFile "/Users/[username]/Sites/crt/example.test-key.pem"
    VirtualDocumentRoot /Users/[username]/Sites/example
</VirtualHost>
<!-- gh-comment-id:1092912087 --> @skuppuraj commented on GitHub (Apr 8, 2022): I am also using macOS Big Sur (11.6.5) and Apache Server with the virtual host. I am sharing the steps I followed and installed successfully. Check if it works for you. My local site name: `example.test` I created the directory `crt` in the document root of the directory Then I installed the certificate for `example.test` site `mkcert example.test` Then I configured the virtual host to load the certificate. ``` Listen 443 <VirtualHost *:443> DocumentRoot "/Users/[username]/Sites/example" ServerName example.test SSLCertificateFile "/Users/[username]/Sites/crt/example.test.pem" SSLCertificateKeyFile "/Users/[username]/Sites/crt/example.test-key.pem" VirtualDocumentRoot /Users/[username]/Sites/example </VirtualHost> ```
Author
Owner

@FiloSottile commented on GitHub (Apr 26, 2022):

As mentioned in https://github.com/FiloSottile/mkcert/issues/412#issuecomment-1009666856, it looks like OP is using the root certificate directly, which is not how mkcert works. Instead, you need to generate a certificate for the website, for example in this case by running mkcert hesweb.loc.

<!-- gh-comment-id:1109215025 --> @FiloSottile commented on GitHub (Apr 26, 2022): As mentioned in https://github.com/FiloSottile/mkcert/issues/412#issuecomment-1009666856, it looks like OP is using the root certificate directly, which is not how mkcert works. Instead, you need to generate a certificate for the website, for example in this case by running `mkcert hesweb.loc`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#271
No description provided.