---
title: "A TLS error caused the secure connection to fail (NSURLErrorDomain -1200) on Mac · Kilobat Guides"
url: "https://kilobat.app/guides/nsurl-error-1200-tls-error-secure-connection-failed"
description: "An app shows A TLS error caused the secure connection to fail, NSURLErrorDomain error -1200. Check the clock, TLS and filters."
---

# “A TLS error caused the secure connection to fail” (NSURLErrorDomain -1200) on Mac

The TLS handshake did not finish. The app and the server did not agree, or something changed the traffic.

**Fix this with your agent**Copies a prompt for Claude Code, Codex or any agent that can use Terminal.

My Mac has this problem: “A TLS error caused the secure connection to fail” (NSURLErrorDomain -1200) on Mac. Read https://kilobat.app/guides/nsurl-error-1200-tls-error-secure-connection-failed.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.

Applies to: macOS 13 Ventura and later. The text was checked in CFNetwork on macOS 27.2. · Checked: 29 October 2026

## Symptoms

- An app shows “A TLS error caused the secure connection to fail.”
- Console shows NSURLErrorDomain Code=-1200.
- Safari shows “can’t establish a secure connection to the server”.

## Likely causes

- **A wrong Mac clock.** Certificates fail when the date is wrong.
- **A server that offers settings that the Mac does not accept.** Old TLS versions or weak ciphers fail.
- **A filter, proxy or antivirus that intercepts HTTPS.** It can break the handshake. See [Corporate proxy certificates break Terminal tools on a Mac](https://kilobat.app/guides/corporate-proxy-certificates).
- **A captive portal or a network that cuts the connection.** The handshake gets no valid reply.

## How to check

1. Compare the Mac date with another device. Use System Settings › General › Date & Time.
2. Show the certificate that the server sends.

   ```
   openssl s_client -connect example.com:443 -servername example.com </dev/null
   ```
3. Request the page and show each step of the connection.

   ```
   curl -v -o /dev/null https://example.com
   ```

## How to fix it

1. Turn on automatic date and time.
2. Turn off a VPN, proxy or HTTPS-scanning app for a test.
3. If the server is yours, update its TLS settings and its certificate chain.
4. Try another network. If it works, the first network interferes.
5. If it is a public Wi-Fi, sign in to the login page first. See [Wi-Fi login page does not appear on a Mac](https://kilobat.app/guides/captive-portal-not-appearing).

## With Kilobat

1. Check Wi-Fi, the router, the internet, DNS and login pages in one step.

   ```
   kilobat diagnose
   ```
2. If one site or service fails, find the layer that stops it.

   ```
   kilobat why example.com
   ```
3. The 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](https://kilobat.app/guides/recipes/why-cant-it-connect).

## Questions

**Is -1200 a certificate error?**

Not always. Certificate errors have their own codes, such as -1202. See [“The certificate for this server is invalid” (NSURLErrorDomain -1202) on Mac](https://kilobat.app/guides/nsurl-error-1202-certificate-for-this-server-is-invalid).

**Why does it fail in an app and not in Safari?**

The app can have its own TLS rules or proxy settings.

## 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.

## Related guides

- [“Safari can’t establish a secure connection to the server” on Mac](https://kilobat.app/guides/safari-cant-establish-secure-connection): Safari shows this when the secure connection to the server fails before the page loads.
- [“This Connection Is Not Private” and certificate warnings on a Mac](https://kilobat.app/guides/connection-not-private-mac): Safari shows a certificate warning when it cannot confirm the identity of a website.
- [Corporate proxy certificates break Terminal tools on a Mac](https://kilobat.app/guides/corporate-proxy-certificates): Some company networks inspect HTTPS traffic.
- [NET::ERR_CERT_DATE_INVALID in Chrome on Mac](https://kilobat.app/guides/err-cert-date-invalid): The server's certificate looks expired or not yet valid by the Mac's clock.
- [Wi-Fi login page does not appear on a Mac](https://kilobat.app/guides/captive-portal-not-appearing): Public networks often hold all traffic until you sign in on a login page.
