How to trust an invalid certificate in Big Sur / Safari 14 Since installing Safari 14, I can't find a way of trusting an invalid SSL certificate (either expired or set up for the wrong hostname).
I used to be able to click on the address bar and then trust that specific certificate but can't find a way to do that in Safari anymore.
Note: Don't do this for sites you don't trust!
This might not be the simplest solution, but it's the only one I could come up with (thanks to https://serverfault.com/questions/139728/how-to-download-the-ssl-certificate-from-a-website# for explaining how to download the certificate). Assuming we want to trust https://test.com/

Download the certificate by running this in the Terminal:

echo -n | openssl s_client -connect test.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' &gt; /tmp/test.cert


Add it to your Keychain

open /tmp/test.cert


Add it to the System Keychain



Find it in the Keychain, double-click it and trust it: