You're trying to load a site you've used a hundred times, and Safari slams you with "This Connection Is Not Private" and the error code NSURLErrorServerCertificateUntrusted. Before you panic about hackers, check your iPhone's clock. Nine times out of ten, that's the whole problem.
Cause 1: Your iPhone's date or time is wrong
Here's what's actually happening. TLS certificates have a validity window — a not before and a not after date. When Safari connects to a server, it checks the server's certificate against your device's clock. If your iPhone thinks it's January 2019 and the certificate was issued in 2023, Safari sees a certificate that hasn't been valid yet and refuses the connection. Same thing if your clock jumped forward past the expiry date. The certificate is fine; your clock is lying to Safari.
This happens more than you'd think. Dead battery for a few days, a botched restore from an old backup, manually setting the time and forgetting about it, or flying across time zones with auto-time disabled. I've seen it after people swap the battery or do a DFU restore.
The fix
- Open Settings.
- Tap General → Date & Time.
- Turn on Set Automatically.
- If it's already on, toggle it off, wait five seconds, toggle it back on. This forces a fresh NTP sync.
- Check that Time Zone shows your actual location. If it's greyed out, that's fine — it means auto-time is handling it.
Now fully close Safari (swipe up from the bottom, flick the Safari card away) and reopen the site. Certificates are cached per-session, so a hard reload matters.
If auto-time won't stick, your iPhone might have a corrupted time daemon. A restart usually clears it. If not, check that you're on Wi-Fi or cellular — NTP needs a network to sync.
Cause 2: The server's certificate is genuinely expired or misconfigured
Sometimes it's not you. It's them. The site admin let the certificate lapse, or they mixed up their intermediate certificate chain. You'll hit this on smaller sites, internal company portals, or that one WordPress blog someone forgot about.
How do you tell? Open the same URL on a different device — a laptop on the same Wi-Fi, or a friend's phone on cellular. If they get the same warning, it's the server. If they don't, it's your phone.
What you can do
- Try the URL with
http://instead ofhttps://. Not ideal for anything with a login, but fine for reading a blog post. - Use a different browser (Chrome, Firefox) to confirm — they'll show the same error if it's server-side.
- If it's a site you control, run it through Qualys SSL Labs. It'll tell you exactly which link in the chain is broken.
- Contact the site owner. There's no client-side fix for an expired cert on their end.
Don't tap "Visit this website" unless you genuinely know the site and accept the risk. That bypass is how people get MITM'd on public Wi-Fi.
Cause 3: A VPN, proxy, or corporate Wi-Fi is intercepting the connection
Some networks — corporate offices, hotels, airports, schools — run what's called a man-in-the-middle proxy. They decrypt your HTTPS traffic, inspect it, and re-encrypt it with their own certificate. If that certificate isn't installed and trusted on your iPhone, Safari sees an untrusted issuer and throws NSURLErrorServerCertificateUntrusted.
VPN apps can cause this too, especially ones that do "SSL inspection" or DNS filtering. Same with some parental control apps and ad blockers that install a root certificate profile.
The fix
- Go to Settings → General → VPN & Device Management. Look for any configuration profiles or VPN entries you don't recognize.
- If you're on a work or school Wi-Fi and need access, ask IT for their root CA certificate and install it. Then go to Settings → General → About → Certificate Trust Settings and enable full trust for that root.
- If you don't need the VPN, disable it and retry.
- On public Wi-Fi, switch to cellular data and reload. If the site loads fine on cellular, the network is the problem.
Also worth checking: if you recently installed a "free VPN" from the App Store, that's your culprit more often than you'd expect. Delete it.
Quick reference: cause and fix
| Symptom | Likely cause | Fix |
|---|---|---|
| Every HTTPS site fails | Wrong date/time on iPhone | Settings → General → Date & Time → Set Automatically |
| Only one site fails, other devices also fail | Expired or misconfigured server cert | Contact site owner; use http:// as workaround |
| Fails only on one Wi-Fi network | Corporate proxy or captive portal | Switch to cellular or install the network's root CA |
| Fails after installing a VPN or profile | SSL inspection / malicious profile | Remove the profile in VPN & Device Management |
| Fails after a restore from old backup | Stale clock from backup | Toggle auto-time off/on, restart iPhone |
Start with the clock. It's free, takes ten seconds, and fixes the majority of these. If that doesn't do it, work down the list — the answer is almost always one of these four.