Safari can't establish a secure connection: causes and fixes

11 min readUpdated

"Safari can't establish a secure connection" means Safari could not set up an encrypted connection to the site. Apple's troubleshooting for iPhone, iPad and Mac starts with one test, loading the site over another network [1]. On the device, Apple points at VPN apps, security software, configuration profiles and iCloud Private Relay [1][3]. On the server, a certificate outside Apple's rules makes connections fail [7], and devices on iOS 26 and macOS Tahoe 26 may fail to connect to some legacy servers [9]. It is part of the SSL errors section.

Quick facts

Where
Safari on iPhone, iPad and Mac [1][2]
First test
the same site over mobile data or another Wi-Fi network [1]
On the device
VPN and security apps, configuration profiles, iCloud Private Relay [1][3]
On the server
a certificate outside Apple's requirements; a TLS implementation that cannot read a large ClientHello [7][9]
In apps
NSURLErrorSecureConnectionFailed; App Transport Security sets stricter defaults [6][10][11]
Who fixes it
your side, if another network or device works; the site's developer, if every browser and device on the network fails [2]

What the error tells you

"Safari can't establish a secure connection" names the failure, not its cause, so on iPhone, iPad or Mac the cause comes from tests. Apple's articles keep two situations apart. In one, Safari shows a security warning: Apple's cases include an expired or illegitimate certificate, and a valid certificate on TLS 1.1 or earlier [5]. Certificate warnings in other browsers are explained under Your connection is not private. In the other, the page does not load, and Apple starts with the network and the device [1][2].

Two answers place the cause. Does the site open over another network? Does it fail in other browsers and on other devices on the same network? If another network works, the first network or something on your device is in the way. If everything on the network fails, Apple says the issue is probably with the website, and its developer has to fix it [2].

Fixes on iPhone, iPad and Mac

On iPhone and iPad

  1. Change the network. Load the site over mobile data, or join a different Wi-Fi network. Apple's example is loading www.apple.com over cellular data [1]. If the site opens there, the first network is the cause; its administrator or your internet provider might be able to help [3].

  2. Check the VPN. With a VPN turned on, Apple notes, some apps or websites might block content from loading [1]. Turn off the app's features and try again [3].

  3. Look for security apps. Apple names VPN, firewall, antivirus and parental-control apps and content blockers [3].

  4. Search Settings on the iPhone or iPad for VPN, profile, firewall and filter. A configuration profile that your organization does not manage and require can go: tap it and confirm the deletion. On a managed device, ask the organization first [3].

  5. Try without Private Relay. If only one site fails, Apple suggests checking Private Relay [1]. Turn off Limit IP Address Tracking in the Wi-Fi network's details, or choose Show IP Address from the Page Menu for that site [4].

  6. Check the basics. Correct date, time and time zone, the latest software update, a restart. If nothing helps, reset network settings [3].

On a Mac

Apple's list for Safari on Mac adds a few places to look [2]:

  • Extensions. In Safari settings, open Extensions and turn each one off. If one of them causes the failure, update it.

  • Private Relay. Choose View, then Reload and Show IP Address, or turn off Limit IP address tracking in the details of your network in System Settings, Network [2][4].

  • VPN and security software. Turn off the app's features, then search System Settings for VPN, profile, firewall and filter. Select a configuration profile you can remove and click the minus button below it. If the software that created a setting is still in use, the setting might return [3].

  • Network settings. Custom proxy or DNS settings can affect access, even if software changed them for you. A new network location resets them [2].

  • Updates. Safari is included with macOS, so a newer Safari comes with a macOS update [2].

Another browser on the same Mac

Apple suggests viewing the page in a different browser or on a different device on the same network [2]. On a Mac, that has a second use: Chrome and Firefox print an error code, and pages in this section explain them. A code in another browser can point to a certificate or TLS protocol problem that Safari's message does not name. Firefox shows Secure Connection Failed with a code under it. Chrome's default code for a failed TLS handshake is ERR_SSL_PROTOCOL_ERROR; when no protocol version or cipher is shared, it shows ERR_SSL_VERSION_OR_CIPHER_MISMATCH. If both open the site, go back to Safari's own settings and extensions in the Mac list above.

Causes on the server

These apply when the site fails on every network and device.

Certificates outside Apple's requirements

For an iPhone on iOS 13 and a Mac on macOS 10.15, Apple lists requirements for all TLS server certificates [7]:

  • RSA keys of 2048 bits or more, in the server certificate and in the issuing CAs;

  • a signature hash from the SHA-2 family; SHA-1 signed certificates are no longer trusted for TLS;

  • the server's DNS name in the Subject Alternative Name extension; DNS names in the Common Name are no longer trusted.

Certificates issued after July 1, 2019, as their NotBefore field shows, must also carry an Extended Key Usage extension with the id-kp-serverAuth OID and a validity period of 825 days or fewer [7]. Apple says that connections to servers breaking these rules fail, and websites may not load in Safari [7]. Apple writes "all TLS server certificates", so certificates from a private CA are included. A separate limit applies only to certificates from the root CAs preinstalled on Apple devices: issued on or after September 1, 2020, they must not be valid for more than 398 days. Certificates from user-added or administrator-added roots are not affected [8].

A server that cannot read a large ClientHello

On iOS 26, iPadOS 26, macOS Tahoe 26 and visionOS 26, the ClientHello, the first message of the TLS handshake, advertises the hybrid quantum-secure key exchange X25519MLKEM768 and carries a key share for it. A server without support for it can pick another group from the same message [9]. Apple warns that these devices may fail to connect to some legacy servers whose TLS implementation fails to read large ClientHello messages [9]. When only devices on these versions fail, look at the server's TLS implementation, not at the iPhone or Mac. On a Mac with macOS Tahoe 26, nscurl --tls-diagnostics https://example.com reports the key exchange group the server chose [9].

Old versions, cipher lists and client certificates

iOS, iPadOS and macOS support TLS 1.0 to TLS 1.3 [6], and a valid certificate on TLS 1.1 or earlier is one of Apple's cases for a Safari security warning [5]. Which versions to enable is covered under TLS versions. When browser and server share no version or cipher, see cipher mismatch. If the endpoint uses mutual TLS, the iPhone or Mac needs a client certificate the server accepts.

Checking the server from any computer

OpenSSL shows the items below from Apple's lists without a Mac. Run the first command for the TLS connection and the second for the certificate the server sends:

openssl s_client -connect example.com:443 -servername example.com -tls1_2 </dev/null
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -text

Reading the output

The right column shows what our test servers and certificates produced when they broke the rule [12]:

Reading the output
RequirementLine to look forOur failing setup
TLS 1.2 or later (App Transport Security) [10]Protocol : TLSv1.2 or TLSv1.3not tested here
ECDHE forward secrecy (App Transport Security) [10]Server Temp Key: with X25519 or ECDH, here X25519, 253 bits; DH means DHE, not ECDHE [13]plain RSA key exchange: no Server Temp Key line; with -cipher ECDHE, alert 40
RSA key of 2048 bits or more [7][10]Public-Key: (2048 bit)Public-Key: (1024 bit)
SHA-2 signature [7], SHA-256 or stronger for apps [10]Signature Algorithm: sha256WithRSAEncryptionsha1WithRSAEncryption
DNS name in Subject Alternative Name [7]X509v3 Subject Alternative Name: with DNS:no such line, the name only in Subject: CN =
id-kp-serverAuth, if issued after July 1, 2019 [7]TLS Web Server Authenticationmissing in the same certificate
825 days or fewer, if issued after July 1, 2019 [7]Not Before and Not After3650 days between them

Peer signing digest in the openssl s_client output is the digest the server used to sign handshake messages, not the certificate's signature; for the certificate, read Signature Algorithm [12][13]. Alert 40 is explained under SSL handshake failed, and more commands under OpenSSL commands.

When apps report the failure

Apps on iPhone, iPad and Mac meet the same servers with stricter defaults. In Apple's URL Loading System, NSURLErrorSecureConnectionFailed (URLError.Code.secureConnectionFailed in Swift) marks an attempt to establish a secure connection that failed "for reasons that can’t be expressed more specifically" [11]. Narrower failures have codes of their own: a server certificate that has expired or is not yet valid, one signed by a root that isn't trusted, a client certificate the server requires [11].

App Transport Security (ATS) applies by default to apps linked against the iOS 9.0 or macOS 10.11 SDKs or later, and it blocks connections below its minimum [10]: TLS 1.2 or later, AES-128 or AES-256, forward secrecy through ECDHE key exchange, and a certificate signed with SHA-256 or stronger and an RSA key of at least 2048 bits or an ECC key of at least 256 bits. Apple's platform TLS prefers cipher suites with forward secrecy; ATS allows only those by default [6].

Testing with nscurl

On a Mac, nscurl --ats-diagnostics --verbose https://example.com repeats the connection with combinations of App Transport Security exceptions. If even the test that allows arbitrary loads fails, the problem is not ATS but default server trust evaluation, such as a name that does not match or an expired certificate. If only the default test fails, you might need to reconfigure the server's TLS settings: when the test passes once forward secrecy is no longer required, the server needs ECDHE key exchange [10]. Apple's advice is to fix the server rather than add exceptions; some exceptions require a justification and might trigger additional App Store review. The rules are in Preventing insecure network connections [10].

FAQ

What does "Safari can't establish a secure connection" mean?

Safari could not set up an encrypted connection to the site. Test another network first; if other browsers and devices on the same network fail too, the website is the likely cause. [1][2]

How do I fix it on iPhone?

Load the site over mobile data or another Wi-Fi network. If it still fails, turn off the VPN, delete a profile you do not need, turn off Private Relay for that network, check the date and time, and update iOS. [1][3][4]

Why do all sites fail in Safari at once?

Look at what handles all of the device's connections: VPN, firewall, antivirus and parental-control apps, content blockers, profiles, custom proxy or DNS settings. Test another network first. [2][3]

Is it a certificate problem?

It can be. A connection fails when the certificate breaks Apple's rules, for example with an RSA key under 2048 bits or a SHA-1 signature. An expired certificate can bring a security warning instead. [5][7]

Why does an app fail when Safari opens the site?

App Transport Security is stricter: by default it requires TLS 1.2 or later and allows only cipher suites with forward secrecy, which Apple's platform TLS only prefers. Test with nscurl --ats-diagnostics. [6][10]

Does iOS 26 cause this error?

iOS 26, iPadOS 26, macOS Tahoe 26 and visionOS 26 send a larger ClientHello, and Apple warns that they may fail to connect to some legacy servers that cannot read it. The fix belongs on the server. [9]

Sources

  1. Apple Support 102456, Safari not loading websites on iPhone and iPad.

  2. Apple Support 102564, Safari on Mac.

  3. Apple Support 102281, VPN and third-party security software.

  4. Apple Support 102022, managing iCloud Private Relay.

  5. Apple Support 102279, Safari security warnings.

  6. Apple Platform Security, TLS security.

  7. Apple Support 103769, requirements for trusted certificates in iOS 13 and macOS 10.15.

  8. Apple Support 102028, limits on trusted certificates.

  9. Apple Support 122756, quantum-secure encryption in TLS.

  10. Apple Developer, Preventing Insecure Network Connections; Identifying the Source of Blocked Connections.

  11. Apple Developer, NSURLErrorSecureConnectionFailed and URLError.Code.

  12. Our tests: OpenSSL 3.0.13 servers and clients, certificates from our own test authority, Linux Mint 22.1.

  13. OpenSSL 3.0: SSL_get_peer_signature_nid, SSL_get_peer_tmp_key and apps/lib/s_cb.c.