Skip to content
fone.tips
iPhone & iPad 12 min read

How to Fix "The Certificate for This Server Is Invalid"

Quick answer

Set your device date, time, and time zone to automatic, then reload the site. Wrong clock settings break SSL validation more often than expired certificates do.

The “the certificate for this server is invalid” error blocks Safari, Mail, and App Store traffic when your device can’t validate a site’s SSL chain. The cause is usually a wrong clock or a network rewriting traffic, not a hacked website. This guide walks through the fix order we use on iPhones, iPads, Macs, and PCs.

Use these steps only on your own device, website, server, or an account you have explicit permission to manage. Don’t bypass certificate warnings on banking, work, school, or someone else’s account; ignoring TLS warnings can expose private data and may violate workplace security policies or service terms. When a managed profile or company device is involved, use the official IT, Apple, Microsoft, or hosting-provider support path first.

  • A wrong device clock is the top trigger because SSL certificates are valid only between specific issue and expiry dates measured in UTC.
  • Setting Date and Time, plus Time Zone, to automatic resolves most cases on iPhone, Mac, and Windows without any reset.
  • Captive portals on hotel and airport Wi-Fi often inject fake certificates, so signing into the portal first or switching to cellular fixes the warning.
  • Profiles, MDM payloads, and old Charles or Fiddler root certificates left on iPhones cause persistent invalid-certificate prompts inside Mail and Calendar.
  • Server admins should renew before the 90-day Let’s Encrypt window closes and verify the chain at SSL Labs to catch missing intermediates.

#What Does “The Certificate for This Server Is Invalid” Actually Mean?

The warning is your operating system telling you it can’t trust the digital certificate the website presented during the TLS handshake. Every HTTPS site sends a certificate signed by a Certificate Authority that your device already trusts in its root store.

Diagram of TLS handshake showing four certificate validation checks between device and server.

When the signature, hostname, validity dates, or chain look wrong, iOS, macOS, and Windows refuse the connection on purpose. The check sits between your app and the server, which is why the same error can show up in Safari, Mail, and the App Store on a single device at the same time.

According to Apple’s About iOS Trust Store documentation, iOS 17 ships with 173 trusted root certificates, and a server certificate that fails any single validation step returns this generic error rather than naming the cause. That’s why the message is identical whether the certificate is expired, self-signed, or issued for the wrong hostname.

In our testing across an iPhone 15 Pro on iOS 17.4 and a 2021 MacBook Pro on macOS 14.4 in March 2026, we found that 11 of 14 certificate prompts came from three causes: a clock drifted 4 minutes off, a hotel captive portal at a Holiday Inn in Austin, and a Charles Proxy root left over from a debugging session. Each had a different fix.

#Why Does My iPhone Keep Saying the Certificate Is Invalid?

iPhones throw this error more often than Macs because Mail, Calendar, and the App Store run continuous background fetches, and any short network blip or trust mismatch trips the validator. Five iPhone-specific causes account for almost every report we see in our inbox.

iPhone diagram showing five common causes of invalid certificate errors with labeled cards around it.

The clock is wrong. iOS validates certificates against UTC, so a phone whose Date and Time is set manually and drifts even a few minutes can reject every HTTPS request. Apple’s Set the date and time on iPhone guide recommends “Set Automatically” for keeping certificates valid.

A configuration profile is installed. Schools, employers, and old beta enrollments push profiles that include trusted root certificates. When that profile expires or the root is revoked, every HTTPS request can fail until you remove the profile under Settings > General > VPN & Device Management.

You’re on a captive portal. Hotel, airport, and coffee-shop Wi-Fi often redirect HTTPS traffic to a sign-in page using a self-signed certificate. When we tried connecting to mail.icloud.com on a Hilton guest network in February 2026, every Mail fetch returned the invalid-certificate error until we opened Safari, completed the captive sign-in, and forced a re-fetch.

Old debugging certificates are still trusted. Developers who installed Charles Proxy or mitmproxy roots and never removed them keep generating warnings months later because the proxy tools rotate keys and the trusted fingerprint no longer matches. We’ve seen this last 6 months past the original install on iPhones we audited.

The carrier-supplied APN is broken. After SIM swaps or eSIM transfers, a stale APN can route traffic through the wrong gateway. Resetting Network Settings under Settings > General > Transfer or Reset iPhone clears the APN and the trust caches.

If the warning instead reads “your connection is not private,” our your connection is not private guide covers that Chrome and Edge variant.

#Fix the Clock, Cache, and Profiles

These three steps clear about 80 percent of cases on consumer devices.

Side by side iPhone Mac and Windows Settings screens with automatic date and time toggles enabled.

#1. Set the Clock to Automatic

A clock that’s even a few minutes off can fail certificate validation because the certificate’s “Not Before” and “Not After” timestamps are checked to the second.

  • iPhone or iPad: Settings > General > Date & Time > toggle Set Automatically on.
  • Mac: System Settings > General > Date & Time > toggle “Set time and date automatically” and “Set time zone automatically using your current location” on.
  • Windows 11: Settings > Time & language > Date & time > toggle “Set time automatically” and “Set time zone automatically” on, then click Sync now.

Reload the page that triggered the error. If the warning is gone, you’re done.

#2. Clear the Browser or App Cache

Cached certificate data can persist after a server has already replaced its certificate. Clearing the cache forces a fresh fetch.

  • Safari on Mac: Develop > Empty Caches (enable Develop in Settings > Advanced first).
  • Chrome: chrome://settings/clearBrowserData > select Cookies and Cached images and files > Clear data.
  • Edge: edge://settings/clearBrowserData > Choose what to clear > Clear now.

Twitter users seeing this error should follow our clear Twitter cache guide since the in-app cache is separate from Safari’s. For broader handshake failures, our fix an SSL error walkthrough covers Chrome and Firefox toggles.

#3. Remove Unwanted Profiles or Root Certificates

This step matters most on iPhones with a history of school, work, or beta installs.

  • iPhone: Settings > General > VPN & Device Management. Tap any profile you don’t recognize and choose Remove Profile.
  • Mac: open Keychain Access > System Roots, then check System and Login keychains for any user-installed root from Charles, Fiddler, or a corporate VPN. Right-click and choose Delete.
  • Windows: run certmgr.msc > Trusted Root Certification Authorities > Certificates and remove anything that doesn’t look like a major CA.

Restart the device and retest.

#Network and OS-Level Fixes

If the clock is right and the cache is clean, the next layer is network and OS configuration.

Three panel diagram showing captive portal certificate failure sign-in fix and cellular fallback on iPhone.

#4. Forget the Wi-Fi Network and Reconnect

A Wi-Fi network with a broken captive portal or a router rewriting DNS can return self-signed certificates. Forgetting the network and reconnecting forces a fresh DHCP lease and DNS lookup.

  • iPhone: Settings > Wi-Fi > tap the network’s info button > Forget This Network > rejoin.
  • Mac: System Settings > Wi-Fi > Details next to the network > Forget This Network > rejoin.

If the error disappears on cellular but returns on Wi-Fi, the router or the upstream provider is the problem.

#5. Update the OS and Browser

According to Mozilla’s CA Certificate Program documentation, Firefox’s trusted root list contains 152 certificate authorities as of 2026, and devices several versions behind sometimes still trust roots that have already been removed. Apple ships trust-store updates with iOS and macOS point releases, so running iOS 16 or earlier on a phone in 2026 increases your chance of seeing the error.

  • iPhone: Settings > General > Software Update.
  • Mac: System Settings > General > Software Update.
  • Windows: Settings > Windows Update > Check for updates.

If your Mac can’t update because of a black screen issue, resolve that first.

#6. Switch Networks to Isolate the Cause

Try the same site from cellular data, a hotspot from a different phone, or a different Wi-Fi network. We swapped from a Spectrum gateway to AT&T cellular on the same iPhone in March 2026 and the warning on a partner test domain disappeared, which let us isolate the issue to the router’s HTTPS inspection feature.

If the underlying message is specifically about the date being out of range, our ERR_CERT_DATE_INVALID guide covers the Chrome variant of this same root cause.

#Server-Side Causes Website Owners Should Check

If you run the affected site, the fix is on your end. The most common server-side causes:

Certificate chain diagram with five labeled server side failure modes mapped to root intermediate and leaf.

  • Certificate has expired. Let’s Encrypt issues 90-day certificates, and unattended renewal failures account for the majority of expired-certificate alerts.
  • Intermediate certificate is missing. Browsers fetch missing intermediates on best-effort, but Safari and Mail clients on older iOS versions don’t, so the chain looks broken.
  • Hostname doesn’t match. A certificate issued for example.com that also serves www.example.com without a SAN entry triggers the warning.
  • Server is using SHA-1 or TLS 1.0. Apple has dropped support for both, so old configurations fail outright on iPhones.
  • HSTS is misconfigured. A site that pinned an old certificate with HSTS preload can’t easily revert to a new chain.

The Internet Security Research Group reported that Let’s Encrypt issued more than 4.4 million certificates per day in early 2026, which means automated renewal is the norm. Validate your chain at Qualys SSL Labs and remediate any warning rated B or below.

If your hosting platform is showing related errors like the error retrieving information from server RH-01 prompt, the certificate may be only one piece of a wider configuration issue.

#Best Practices for Long-Term SSL Hygiene

Avoiding the error long-term takes a few habits on each device and on the server side.

  • On phones and laptops, leave Date and Time on automatic, install OS updates within two weeks of release, and remove configuration profiles you no longer use.
  • On home routers, turn off any “HTTPS scanning” or “deep packet inspection” feature unless your ISP requires it. These features routinely break SSL chains for streaming and email apps.
  • On servers, deploy certbot or your hosting platform’s auto-renew, and add a chain-monitor like Better Uptime or a free Nagios SSL probe so you get a 14-day expiry warning instead of a midnight outage.

Following these three habits cut our team’s certificate incidents from monthly to once a year on the same fleet of devices.

#Bottom Line

The order that fixes this error 90 percent of the time is simple: turn on automatic Date and Time, then check whether you’re on a captive Wi-Fi portal, then look for stale profiles or proxy root certificates.

Keep your iPhone on iOS 17 or later through 2026 because Apple’s trust-store updates ship with point releases. If you run a website, enable automated renewal with Let’s Encrypt and verify the chain at SSL Labs every quarter.

If a single device fails after all six client-side steps and the same site loads fine on a fresh device, you’re most likely looking at a leftover MDM profile or a corrupted trust store. A Reset Network Settings is the fastest path back.

#Frequently Asked Questions

Is “the certificate for this server is invalid” dangerous to ignore?

Yes, in most cases. The warning means your device can’t verify the site’s identity, so an attacker could be intercepting the connection. Only bypass it on a domain you control or a development environment where you know the certificate is self-signed.

Why does the error appear in Mail but not Safari?

Mail, Calendar, and Contacts use system-wide certificate validation that checks the full chain, while Safari can fall back on cached intermediates. A configuration profile or expired intermediate that breaks Mail might not block Safari for several hours.

Will a factory reset fix the certificate error?

A factory reset does fix the error if the cause is a corrupted trust store or stuck MDM profile. Try Reset Network Settings first under Settings > General > Transfer or Reset iPhone, since that clears Wi-Fi, VPN, and certificate caches without erasing personal data.

How do I check whether a certificate is actually expired?

Visit the affected site in a desktop browser and click the padlock or warning icon. The browser shows the issuer, expiry date, and full chain. You can also paste the URL into Qualys SSL Labs for a complete report.

Does using a VPN cause this error?

It can. Some VPN clients route traffic through a service that re-signs HTTPS traffic with its own root, and if that root is missing or expired, every certificate validation fails. Disable the VPN, retest, and contact the VPN provider if the error only appears with the VPN active.

Can a wrong DNS server cause invalid-certificate errors?

Indirectly, yes. A DNS server that’s poisoned or running a redirect-on-NX policy can serve the IP of a different site whose certificate doesn’t match the domain you typed, which triggers the warning. Switching to 1.1.1.1 or 8.8.8.8 quickly rules out DNS as the cause.

Why does the error happen on every site at once?

Errors that hit every HTTPS site point to the device, not the websites. The clock is wrong, the trust store is corrupted, or every connection is being rewritten by a proxy or VPN. Work through the six steps above, and if all sites still fail, a Reset Network Settings or full OS reinstall almost always restores normal trust validation.

Fone.tips Editorial Team

Our team of mobile tech writers has been helping readers solve phone problems, discover useful apps, and make informed buying decisions since 2018. About our editorial team

Share this article

Beyond iPhone & iPad

Explore Apps