TLS and HTTPS Troubleshooting Guide: Diagnose Certificates, Redirects, and Mixed Content
HTTPSTLSSSL certificateshostingweb security

TLS and HTTPS Troubleshooting Guide: Diagnose Certificates, Redirects, and Mixed Content

WWebDevs.cloud Editorial Team
2026-11-15
7 min read

Diagnose HTTPS certificate errors, redirect loops, TLS chain problems, and mixed content with a practical browser, CLI, and hosting checklist.

HTTPS problems are often caused by a small mismatch between the hostname, certificate, redirect rules, proxy, or page resources. This reusable troubleshooting checklist shows how to identify certificate errors, redirect loops, incomplete TLS chains, and mixed content without guessing, then verify a safe fix across browsers, command-line tools, hosting controls, and reverse proxies.

Overview

HTTPS protects the connection between a browser and a website by combining TLS encryption with certificate-based identity checks. When a site fails to load securely, the visible browser message is only a symptom. The underlying cause may be an expired certificate, a certificate issued for a different hostname, a missing intermediate certificate, a DNS or proxy mismatch, an incorrect HTTP-to-HTTPS redirect, or a page that still requests assets over plain HTTP.

Start by defining the exact failure. Test the affected hostname, including whether it is the apex domain or a www subdomain, and record the browser message, URL, response code, and time of the test. Avoid changing several layers at once. A controlled sequence makes it easier to identify whether the problem is in DNS, the edge or reverse proxy, the origin server, the application, or the browser cache.

For a broader deployment sequence covering DNS, secrets, health checks, and rollback planning, see Deploy a Web App to the Cloud: A Provider-Agnostic Checklist. Once HTTPS is working, use the HTTP Headers Reference to inspect security, caching, and content-type behavior.

A quick symptom-to-cause comparison

SymptomLikely areas to inspectFirst useful check
Certificate expiredCertificate renewal, hosting control panel, ACME automationInspect the certificate's validity dates for the exact hostname
Certificate name mismatchDNS target, certificate names, apex versus subdomain configurationCompare the requested hostname with the certificate's subject alternative names
Certificate not trustedCertificate chain, private CA, incomplete intermediate deliveryInspect the full chain served by the public endpoint
Too many redirectsCDN, load balancer, reverse proxy, application redirect logicTrace each response and its Location header
Mixed content warningHTML, CSS, JavaScript, images, fonts, API URLsUse browser developer tools to identify every HTTP resource
Works directly but fails through a proxyProxy TLS mode, forwarded protocol headers, origin certificateCompare direct-origin and public-endpoint behavior

Checklist by scenario

When the browser reports a certificate error

  1. Confirm the hostname. Check the address bar character by character. A certificate for example.com may not cover api.example.com unless that name is explicitly included. Treat the apex domain and each subdomain as separate deployment inputs.
  2. Inspect the served certificate. In the browser's security or certificate details, review the subject alternative names, validity period, issuer, and chain. The certificate visible in the browser is the one delivered by the public endpoint, which may differ from the certificate installed on the origin.
  3. Check DNS and routing. Confirm that the relevant A, AAAA, or CNAME records point to the intended hosting or proxy service. An old IPv6 record can direct some clients to a different server even when the IPv4 configuration looks correct.
  4. Check the chain. Servers generally need to provide the leaf certificate together with the intermediate certificates required by clients to build trust toward a recognized certificate authority. Installing only the leaf certificate commonly produces trust errors for some clients.
  5. Verify the renewal path. Determine who requests and installs certificates: the hosting platform, a reverse proxy, an ACME client, or an operations script. Confirm that the renewal account can complete domain validation and that the resulting certificate is deployed to every relevant listener.

When HTTP-to-HTTPS redirects loop

A redirect loop often appears when a proxy terminates TLS but sends the request to the origin over HTTP. If the application does not recognize the original request as secure, it redirects to HTTPS again. The proxy and application must agree about the client's original protocol, usually through a correctly handled forwarded-protocol header or a platform-specific equivalent.

Trace the chain from the command line:

curl -I http://example.com
curl -I https://example.com
curl -IL --max-redirs 10 https://example.com

Review every status code and Location value. A healthy migration commonly has one deliberate redirect from HTTP to HTTPS, followed by the final response. Check that the redirect preserves the hostname and path, does not alternate between apex and www, and does not add or remove a trailing slash repeatedly. Keep canonical-host rules in one control layer where possible; duplicating them in the proxy and application makes loops harder to diagnose.

When the page shows mixed content

Mixed content occurs when an HTTPS document requests a resource using http://. Inspect the browser console and Network panel, then search the deployed output for insecure URLs. Check more than the main HTML: JavaScript bundles, CSS files, images, fonts, web workers, iframe sources, API endpoints, source maps, and third-party integrations can all contain outdated URLs.

Prefer relative or environment-driven URLs where appropriate, and update application configuration rather than editing only generated files. Confirm that each resource is actually available over HTTPS before changing its reference. An HTTPS page that points to an HTTP API may still fail because the browser blocks the request or because the API's CORS configuration only allows the old origin. For related encoding and URL handling, see the Markdown, HTML, and URL Encoding Reference.

When deployment or renewal breaks the site

  1. Capture the current certificate, proxy configuration, redirect rules, and DNS values before changing them.
  2. Check whether the new certificate was installed on every listener, region, load balancer, or container that can receive traffic.
  3. Validate the configuration before reload or restart where the server supports a test mode.
  4. Reload gracefully and test the public hostname, not only localhost or an internal address.
  5. Keep the previous known-good certificate and configuration available for rollback, while preserving logs that explain the failed change.

What to double-check

Browser inspection

Use a private browsing window or a separate browser profile after server-side changes, but do not rely on cache clearing as the main diagnosis. Inspect the certificate details, security panel, console, and Network panel. Look for failed requests, redirect status codes, blocked mixed-content resources, and requests sent to an unexpected hostname.

Command-line inspection

curl is useful for separating HTTP behavior from application rendering. Use verbose output when you need to see the TLS handshake and response headers:

curl -vI https://example.com
curl -sS -o /dev/null -w "%{http_code} %{url_effective}\n" -L https://example.com

For certificate details, an OpenSSL command can show what a server presents:

openssl s_client -connect example.com:443 -servername example.com -showcerts

Look for the negotiated connection, certificate names, validity dates, and whether the expected chain is sent. Use the server-name option when testing a host behind shared infrastructure; without it, you may inspect a default certificate instead of the one selected for the requested domain.

Proxy and origin assumptions

Document where TLS terminates. It may terminate at a CDN, cloud load balancer, ingress controller, web server, or the application itself. Then answer three questions: Is the public endpoint using the intended certificate? Is the proxy-to-origin connection encrypted if required by the deployment? Does the origin know whether the original client connection was HTTP or HTTPS? These answers prevent fixes in the wrong layer.

Also confirm that firewalls, security groups, and hosting rules allow the validation and production traffic your setup requires. Certificate automation can fail because a validation record or path is routed to an old deployment, not because the certificate configuration itself is invalid.

Common mistakes

  • Testing only one hostname. Validate the apex domain, subdomains, redirects, and any API or asset hostnames that users actually load.
  • Installing only the leaf certificate. Serve the required intermediate chain and verify it from the public endpoint.
  • Changing DNS, certificates, and redirects together. Make one controlled change at a time and record the result.
  • Trusting an internal test. A direct origin test may bypass the proxy, DNS route, SNI selection, or public certificate that real users encounter.
  • Hard-coding HTTP URLs. Search source code, environment variables, CMS content, build output, and third-party settings for old schemes.
  • Using a permanent redirect too early. During a migration, confirm the destination and rollback plan before making redirect behavior difficult to undo in clients or intermediaries.
  • Ignoring renewal observability. Record certificate expiration and renewal results, and alert on failures before users see an expired certificate.

When to revisit

Revisit this checklist before a domain migration, hosting move, certificate renewal, proxy or load-balancer change, CDN configuration update, or major application deployment. It is also useful after changing DNS records, enabling IPv6, adding a subdomain, rotating secrets used by certificate automation, or changing the way an application detects the original request protocol.

Before seasonal planning cycles, review ownership and access: who can update DNS, who controls the certificate account, where renewal logs are stored, and how a failed deployment is rolled back. When workflows or tools change, repeat the command-line and browser checks because platform defaults, proxy behavior, and ACME client configuration may differ between environments.

Finish with a small verification record containing the tested hostnames, certificate expiry date, chain result, redirect sequence, mixed-content result, and rollback location. That record turns a future HTTPS incident into a repeatable operational task rather than an emergency investigation. For the wider release workflow, pair this guide with the cloud deployment checklist and verify that post-deployment headers and caching still match the intended security configuration.

Related Topics

#HTTPS#TLS#SSL certificates#hosting#web security
W

WebDevs.cloud Editorial Team

Technical Editors

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.