TLS Certificate and HTTPS Errors: A Diagnostic Guide for Domains and Reverse Proxies
TLSHTTPSSSL CertificatesReverse ProxyWeb Troubleshooting

TLS Certificate and HTTPS Errors: A Diagnostic Guide for Domains and Reverse Proxies

PPlkdt Labs
2026-11-30
8 min read

A practical checklist for diagnosing certificate warnings, TLS handshake failures, redirect loops, mixed content, and renewal problems.

HTTPS failures can come from several different layers: DNS, certificate issuance, the web server, a reverse proxy, or the application itself. This diagnostic guide gives you a reusable way to identify the failing layer, inspect certificates from the command line, check proxy and redirect behavior, and troubleshoot renewal problems without changing multiple variables at once.

Overview

A browser certificate warning does not always mean that the certificate is simply “expired.” The hostname may be missing from the certificate, DNS may point to the wrong server, a proxy may be using a different certificate than the origin, or the server may support an incompatible TLS configuration. A redirect loop or mixed-content warning can also appear after HTTPS is enabled even when the certificate itself is valid.

Start by separating the problem into four questions:

  1. Does the hostname resolve to the intended endpoint?
  2. Does that endpoint present a certificate covering the hostname?
  3. Can the client and server complete a TLS handshake?
  4. Does the application generate consistent HTTPS URLs and redirects?

Work through those questions in order. DNS and certificate checks should come before application changes. If a reverse proxy or CDN is involved, inspect both the public edge and the origin server; they may terminate TLS independently.

For background on the DNS records involved in connecting a domain to infrastructure, see DNS Records Explained by Purpose. If you are changing DNS during a migration, the Route 53 tutorial provides a useful record-change workflow.

Checklist by scenario

1. Certificate warning or hostname mismatch

Typical browser wording includes “your connection is not private,” “certificate name mismatch,” or an error such as ERR_CERT_COMMON_NAME_INVALID. Check the following:

  • Confirm the exact hostname in the address bar, including whether it is www, the apex domain, or a subdomain.
  • Confirm that the certificate’s Subject Alternative Name list includes that hostname. The common name alone is not a sufficient inspection point.
  • Check whether DNS sends the hostname to the server, load balancer, CDN, or reverse proxy that you intended.
  • Verify that the server selects the correct certificate using the requested hostname. On shared infrastructure, incorrect SNI or virtual-host configuration can expose a neighboring site’s certificate.
  • Check both IPv4 and IPv6. An incorrect AAAA record can send some clients to a different endpoint even when the A record is correct.

A quick certificate inspection from a shell is:

openssl s_client -connect example.com:443 -servername example.com < /dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates -ext subjectAltName

Replace the hostname with the affected domain. The -servername option is important because it asks the server for the certificate associated with that hostname.

2. TLS handshake failure

Handshake errors can appear as SSL_ERROR_HANDSHAKE_FAILURE_ALERT, ERR_SSL_VERSION_OR_CIPHER_MISMATCH, or a connection that closes before an HTTP response is returned. Inspect:

  • The TLS versions enabled at the proxy and origin.
  • The cipher and protocol requirements enforced by your hosting platform, load balancer, or operating system.
  • Whether the proxy is trying to connect to the origin over HTTPS when the origin only serves HTTP, or vice versa.
  • Whether the origin certificate is trusted by the proxy when strict origin verification is enabled.
  • Whether a firewall, security group, or network policy permits connections on port 443.

Use verbose curl output to distinguish a TLS failure from an HTTP failure:

curl -vI https://example.com

Do not treat a successful TCP connection as proof that HTTPS is working. The handshake must complete and the server must return a response for the requested hostname.

3. Redirect loop after enabling HTTPS

A redirect loop often occurs when TLS terminates at a reverse proxy, but the application believes the incoming request is still HTTP. The proxy redirects HTTP to HTTPS, the application redirects what it thinks is an HTTP request back to HTTPS, and the client repeats the cycle.

  • Follow the redirect chain with curl -IL https://example.com.
  • Check whether the response alternates between two hostnames, such as the apex domain and www.
  • Inspect the proxy’s forwarded scheme and host headers, commonly X-Forwarded-Proto and Host.
  • Configure the application framework to trust proxy headers only from the expected proxy or network boundary.
  • Choose one canonical HTTPS hostname and apply the redirect in one deliberate layer where possible.

Also check for conflicting redirects in the CDN, load balancer, web server, application middleware, and CMS configuration. Multiple independent redirect rules are difficult to reason about and easy to reintroduce during deployment.

4. Mixed-content warnings

Mixed content means an HTTPS page requests a resource over HTTP. Browsers may block scripts, stylesheets, fonts, images, or API calls depending on the resource and browser behavior. Review:

  • Browser developer tools for the exact insecure URL.
  • Hard-coded http:// links in templates, CSS, JavaScript, or configuration.
  • API base URLs and third-party integrations stored in environment variables.
  • Absolute URLs generated by the application when it is behind a TLS-terminating proxy.
  • Image, font, and stylesheet URLs stored in a database or content management system.

Change resource URLs to HTTPS where the destination supports it. Do not blindly replace every URL without testing; some third-party endpoints may need a supported HTTPS address or a different integration.

5. Certificate renewal failure

When automated renewal fails, first determine whether the certificate authority can complete its domain-control validation. Check that the required HTTP or DNS challenge is reachable and that recent DNS, proxy, firewall, or deployment changes have not intercepted it.

  • Confirm the renewal job is running and record its last successful attempt.
  • Inspect renewal logs for the exact hostname and challenge type.
  • Verify that challenge paths are not redirected, blocked by authentication, cached incorrectly, or routed to the wrong backend.
  • For DNS validation, confirm the expected TXT record exists at the correct name and has not been overwritten by automation.
  • Confirm the renewed certificate is actually installed and selected by the public listener.
  • Test the complete chain from an external network after deployment.

Keep certificate issuance permissions and DNS credentials separate where practical. The CI/CD secrets checklist is relevant when renewal or deployment credentials are handled by automation.

What to double-check

DNS and endpoint selection

Query the records from more than one resolver when investigating a recent change. A DNS result is not the same as proof that the service behind it is configured correctly. Check the record type, target, TTL, and whether a provider is proxying the request instead of returning the origin address directly. Remove stale records only after confirming that they are no longer required by another service.

Pay particular attention to:

  • A and AAAA records pointing to different infrastructure.
  • CNAME records that target an old deployment or provider hostname.
  • CAA records that restrict which certificate authorities may issue for the domain.
  • Wildcard certificates that do not cover the apex domain.
  • Separate certificates required for the public proxy and the private origin.

For managed DNS operations and change control, compare your provider’s record history, access controls, and automation options using the managed DNS provider comparison.

Reverse-proxy configuration

Document where TLS terminates. A common layout is client to CDN or load balancer over HTTPS, then proxy to origin over HTTP or HTTPS. Neither choice is automatically correct; it must match the origin’s listener and the security requirements of the environment.

  • Confirm the proxy has the correct certificate for every served hostname.
  • Confirm the proxy forwards the original host and scheme as expected.
  • Check the upstream port and protocol.
  • Verify health checks use the correct hostname and protocol.
  • Reload configuration safely and confirm the active configuration, rather than only the file on disk.

If Kubernetes is involved, inspect the Ingress or Gateway resource, the referenced TLS secret, the controller logs, and the service port. The Kubernetes Ingress and Gateway API guide covers these checkpoints in a broader routing workflow.

Application behavior

After the certificate and proxy are correct, inspect application-generated URLs, session-cookie security settings, canonical URLs, and health checks. A deployment can be reachable at HTTPS while still producing HTTP links or failing a health check because the check uses the wrong host header. Record the intended scheme and canonical hostname in configuration so future deployments do not infer them inconsistently.

Common mistakes

  • Checking only the expiration date: A current certificate can still omit the requested hostname or be served by the wrong endpoint.
  • Testing only from inside the server: Local tests may bypass DNS, a CDN, firewall rules, or the public certificate path.
  • Ignoring IPv6: Users reaching an incorrect AAAA target can see a different certificate or handshake behavior.
  • Changing DNS, proxy settings, and application redirects together: Make one controlled change at a time and preserve the previous configuration.
  • Assuming a DNS change is instant everywhere: Resolver caches and provider behavior mean that different networks may return different answers during a transition.
  • Trusting forwarded headers from every client: Proxy-aware applications need a defined trust boundary to avoid incorrect scheme detection and security problems.
  • Renewing successfully but not deploying the certificate: The certificate files, service configuration, and active listener must all be updated.
  • Using a broad certificate or DNS permission without review: Automation should have only the access required for its task, with logs and a tested recovery path.

When to revisit

Revisit this checklist before certificate renewal windows, domain migrations, new subdomain launches, proxy or CDN changes, and major hosting or deployment changes. It is also worth reviewing after an unexplained browser warning, a failed health check, or a change to DNS automation.

For an incident, use this short sequence:

  1. Capture the exact hostname, browser error, time, and affected network or region.
  2. Run DNS queries for both A and AAAA records and confirm the intended endpoint.
  3. Inspect the public certificate with SNI and verify names, dates, issuer, and chain.
  4. Run curl -vI and curl -IL to inspect TLS and redirects separately.
  5. Check proxy termination, forwarded headers, upstream protocol, and active configuration.
  6. Inspect renewal, web-server, proxy, and deployment logs for the same time window.
  7. Apply the smallest reversible fix, then test from outside the server and through the normal user path.

After resolution, record the final DNS target, certificate location, TLS termination point, renewal owner, and canonical redirect rule. That small runbook turns the next HTTPS incident from guesswork into a repeatable diagnostic process.

Related Topics

#TLS#HTTPS#SSL Certificates#Reverse Proxy#Web Troubleshooting
P

Plkdt Labs

Editorial Team

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.