“The certificate for this server is invalid” (NSURLErrorDomain -1202) on Mac
The Mac does not trust the certificate that the server sent. The name, the chain or the site can be wrong.
My Mac has this problem: “The certificate for this server is invalid” (NSURLErrorDomain -1202) on Mac. Read https://kilobat.app/guides/nsurl-error-1202-certificate-for-this-server-is-invalid.md and work through it with me. Install the Kilobat CLI if it’s missing: brew install seifip/kilobat/kilobat. Run the guide’s Terminal and kilobat checks yourself and tell me what you find. List the steps only I can do. Ask before you change any setting.
Symptoms
- An app shows “The certificate for this server is invalid.”
- Console shows NSURLErrorDomain Code=-1202.
- The same site can open on another device or network.
Likely causes
- The certificate lists another name. The name in the URL is not on the certificate.
- A self-signed or incomplete chain. The Mac cannot link the certificate to a trusted authority.
- A device on the network that replaces the certificate. A filter or proxy can do this. See Corporate proxy certificates break Terminal tools on a Mac.
- A phishing or fake server. If the site is not yours, treat the warning as real.
How to check
Show the certificate that the server sends.
openssl s_client -connect example.com:443 -servername example.com </dev/nullCompare the Mac date with another device. Use System Settings › General › Date & Time.
Request the page and show each step of the connection.
curl -v -o /dev/null https://example.com
How to fix it
Check that the URL is the real address of the site.
Try another network. If the error goes away, the first network replaces the certificate.
If the server is yours, install a certificate that lists the host name, with the full chain.
Do not trust a certificate for a site that you do not know.
With Kilobat
Check Wi-Fi, the router, the internet, DNS and login pages in one step.
kilobat diagnoseIf one site or service fails, find the layer that stops it.
kilobat why example.comThe CLI is free. In the app, the advice from these checks is part of Kilobat Pro. See Find why one site or API won't connect.
Questions
What does pretending mean?
The full message adds that you might be connecting to a server that is pretending to be the host. That can put confidential information at risk.
Can I ignore it?
Not for a site that handles passwords or payments.
Sources
- Error text in CFNetwork.framework, macOS 27.2 (Localizable.loctable)
- curl(1) and nc(1), man page installed with macOS 27.2
Checked on 29 October 2026.