`https://example.com` works, but `https://www.example.com` shows "NET::ERR_CERT_COMMON_NAME_INVALID".
BeginnerTroubleshootingDNS, TLS and certificates
Answer
Likely causes → The certificate's Subject Alternative Names cover example.com only. Browsers ignore the CN and check only SANs, so www doesn't match. A wildcard *.example.com also doesn't cover the bare apex.
Diagnose →
echo | openssl s_client -connect www.example.com:443 -servername www.example.com 2>/dev/null | openssl x509 -noout -ext subjectAltName
Fix → Reissue with both names, for example in cert-manager:
spec:
dnsNames:
- example.com
- www.example.com
Then redirect www to the apex (or the other way round) so you have one canonical host.
Prevent → Keep the hostname list in one place (the Ingress or Certificate spec) and probe every public hostname, not just the main one.
More on DNS, TLS and certificates
Monday morning every browser shows "NET::ERR_CERT_DATE_INVALID" for app.example.com; the cert is from Let's Encrypt via cert-manager.BeginnerYou changed the A record for api.example.com to a new load balancer an hour ago, but some users still reach the old server.BeginnerA cert-manager Certificate is stuck at "Issuing"; the Challenge says "Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200'".IntermediateAfter switching to a slim base image, the service fails every outbound HTTPS call with "x509: certificate signed by unknown authority".BeginnerBrowsers load the site fine, but Android apps and `curl` from servers fail with "unable to verify the first certificate" or "unable to get local issuer certificate".IntermediatePods across the cluster log "dial udp 10.96.0.10:53: i/o timeout" and "getaddrinfo EAI_AGAIN" during peak traffic.Intermediate