Back to Blog
Technicalssltlshttps

Understanding SSL/TLS Certificates: How HTTPS Keeps the Web Secure

Learn how TLS handshakes work, understand certificate chains of trust, and master the differences between DV, OV, and EV certificates for securing your website.

Loopaloo TeamFebruary 1, 202614 min read

Understanding SSL/TLS Certificates: How HTTPS Keeps the Web Secure

Every time you visit a website and see that reassuring padlock icon in your browser's address bar, a remarkable cryptographic dance is taking place behind the scenes. SSL/TLS certificates are the backbone of secure communication on the internet, enabling everything from online banking to private messaging. Yet despite their ubiquity, the mechanics of how certificates actually work remain opaque to many developers and IT professionals. This article pulls back the curtain on the TLS handshake, the chain of trust, certificate types, and the common pitfalls that can leave a site vulnerable or inaccessible.

The TLS Handshake: A Cryptographic Conversation

When your browser connects to an HTTPS-enabled server, the two parties engage in what is known as the TLS handshake. This process establishes a secure, encrypted channel before any application data is exchanged. Understanding it is essential for anyone who manages web infrastructure or debugs connectivity issues.

The handshake begins when the client sends a ClientHello message to the server. This message contains the TLS versions the client supports, a list of cipher suites it can use (combinations of key exchange, encryption, and hashing algorithms), and a randomly generated value known as the client random. The server responds with a ServerHello message, selecting the highest mutually supported TLS version and the strongest cipher suite from the client's list. The server also sends its own random value and, crucially, its digital certificate.

The client then verifies the server's certificate against its own trusted certificate store. If the certificate checks out, the two parties proceed to key exchange. In modern TLS 1.3, the handshake uses ephemeral Diffie-Hellman key exchange exclusively, which provides forward secrecy — meaning that even if the server's private key is later compromised, past sessions cannot be decrypted. Both sides derive a shared session key from the exchanged parameters, and from that point forward, all communication is encrypted with symmetric cryptography, which is orders of magnitude faster than the asymmetric cryptography used during the handshake itself.

TLS 1.3 streamlined this process significantly compared to its predecessors. The handshake now completes in a single round trip (1-RTT) rather than the two round trips required by TLS 1.2, and in some cases can even achieve zero round trips (0-RTT) for resumed sessions. This reduction in latency was a major motivating factor behind the new protocol version.

The Chain of Trust: Root CAs, Intermediates, and Leaf Certificates

A certificate on its own is just a bundle of data. What gives it authority is the chain of trust — a hierarchical system that traces a certificate's legitimacy back to a trusted root Certificate Authority.

At the top of the hierarchy sit root CAs, organizations like DigiCert, GlobalSign, and the Internet Security Research Group (which operates Let's Encrypt). These root CAs have their certificates pre-installed in operating systems and browsers. Because compromising a root CA would undermine the entire PKI ecosystem, root CA private keys are kept in air-gapped hardware security modules and are rarely used directly. Instead, root CAs issue intermediate certificates, which in turn sign the end-entity (or leaf) certificates that websites actually use.

When your browser receives a server's leaf certificate, it walks up the chain: it checks that the leaf was signed by an intermediate, that the intermediate was signed by a root, and that the root exists in the browser's trust store. If any link in this chain is broken — whether due to an expired intermediate, a missing certificate in the chain, or a root that the browser does not recognize — the connection fails with a certificate error.

You can inspect this chain yourself using a Certificate Decoder, which parses the raw certificate and displays every field in a human-readable format. Similarly, a SSL Checker will probe a live domain and report on the full chain, flagging any issues with ordering, expiration, or missing intermediates.

Certificate Types: DV, OV, and EV

Not all certificates are created equal. The industry recognizes three validation levels, each representing a different degree of vetting by the certificate authority.

Domain Validation (DV) certificates are the simplest and most common. To obtain one, you need only demonstrate control over the domain in question — typically by responding to an email sent to an administrative address, placing a specific DNS record, or serving a file at a designated URL path. DV certificates can be issued in seconds and are the type provided free of charge by Let's Encrypt. They confirm that the entity requesting the certificate controls the domain, but they say nothing about who that entity is.

Organization Validation (OV) certificates go a step further. The CA verifies that the requesting organization legally exists by checking business registries, phone numbers, and physical addresses. The organization's name appears in the certificate's subject field. OV certificates provide a modest increase in trustworthiness and are common among businesses that want to associate their verified identity with their domain.

Extended Validation (EV) certificates represent the most rigorous vetting process. The CA performs extensive checks, including verifying the organization's legal, physical, and operational existence, confirming the authority of the person requesting the certificate, and ensuring the organization has exclusive rights to the domain. Historically, browsers displayed the organization's name in a green bar beside the URL, though most modern browsers have moved away from this visual distinction, which has diminished the practical value of EV certificates in the eyes of many security professionals.

Anatomy of a Certificate: Key Fields

Every X.509 certificate contains a set of standardized fields that define its identity and capabilities. The Common Name (CN) traditionally held the domain name the certificate covered, though modern practice has shifted to relying on the Subject Alternative Name (SAN) extension, which can list multiple domains and wildcard patterns. If you are debugging a hostname mismatch error, the SAN field is the first place to look.

The validity period defines the Not Before and Not After dates between which the certificate is considered valid. The industry trend has been toward shorter lifetimes — Let's Encrypt certificates are valid for only 90 days — to reduce the window of exposure if a private key is compromised. The Key Usage and Extended Key Usage extensions specify what the certificate's public key is authorized to do. A typical server certificate will have key usage flags for digital signature and key encipherment, along with extended key usage for TLS Web Server Authentication.

The certificate also contains the issuer's distinguished name, a serial number unique within that CA, and the signature algorithm used (commonly SHA-256 with RSA or ECDSA). Inspecting these fields is straightforward with a Certificate Decoder, which is invaluable when troubleshooting certificate deployment.

Let's Encrypt and the ACME Protocol

The launch of Let's Encrypt in 2015 fundamentally changed the certificate landscape. Before its arrival, obtaining a TLS certificate required payment and often a cumbersome manual process. Let's Encrypt made DV certificates free and automated, driving HTTPS adoption from roughly 40 percent of web page loads in 2016 to well over 90 percent today.

The engine behind this automation is the ACME (Automatic Certificate Management Environment) protocol, now standardized as RFC 8555. ACME works by having the client (typically Certbot or a similar agent) communicate with the CA's server to prove domain control through one of several challenge types. The HTTP-01 challenge requires placing a token at a specific URL path on the domain. The DNS-01 challenge requires creating a specific TXT record in the domain's DNS zone, and is the only method that supports wildcard certificates. Once the challenge is verified, the CA issues the certificate, and the ACME client can install and renew it without human intervention.

For development and testing environments where you do not need a publicly trusted certificate, a Self-Signed Certificate Generator can produce a certificate instantly. And when you do need to request a certificate from a CA — whether Let's Encrypt or a commercial provider — a CSR Generator will create the properly formatted Certificate Signing Request that the CA requires.

Certificate Transparency Logs

Certificate Transparency (CT) is a framework designed to detect misissued certificates. When a CA issues a certificate, it submits it to one or more publicly auditable CT logs, which return a Signed Certificate Timestamp (SCT). Modern browsers require the presence of SCTs to trust a certificate, effectively ensuring that every certificate is logged and can be monitored.

This system allows domain owners to watch for unauthorized certificates issued for their domains. Services like crt.sh and Google's CT search let anyone query the logs by domain name. If an attacker were to trick a CA into issuing a certificate for your domain, the CT logs would reveal it, enabling rapid detection and revocation. This transparency mechanism has exposed several real CA compromises and misissuances, proving its value as a security safeguard.

Common Certificate Errors and How to Fix Them

Certificate errors are among the most frequently encountered issues in web development and operations. Understanding them is essential for maintaining a reliable HTTPS deployment.

An expired certificate is the most straightforward error. Certificates have a finite validity period, and when that period elapses, browsers will refuse to trust the certificate. The fix is simply to renew and deploy a new certificate. Automation through ACME largely eliminates this problem, but many organizations still manage certificates manually for internal services and inevitably encounter expiration issues.

A hostname mismatch occurs when the domain in the browser's address bar does not match any of the names listed in the certificate's SAN extension. This commonly happens when a certificate is issued for www.example.com but the site is also served on example.com without the www prefix, and the latter was not included as a SAN entry. The solution is to ensure your certificate covers all the domains and subdomains you serve.

The "self-signed certificate" or "certificate not trusted" error appears when the browser cannot build a chain of trust to a known root CA. This happens with self-signed certificates, certificates signed by a private CA, or when intermediate certificates are missing from the server's certificate chain. In production, the fix involves installing the correct intermediate certificates alongside the leaf certificate. In development, you may choose to explicitly trust a self-signed certificate in your local trust store.

Running a SSL Checker against your domain is the fastest way to identify which of these issues is affecting your deployment. It will verify the certificate chain, check expiration dates, confirm hostname coverage, and test for common misconfigurations.

HSTS and Preloading

HTTP Strict Transport Security (HSTS) is a response header that instructs browsers to only access the site over HTTPS for a specified period of time. Once a browser receives an HSTS header, it will automatically convert any HTTP requests to the domain into HTTPS requests, preventing downgrade attacks and mixed-content vulnerabilities.

The header takes the form Strict-Transport-Security: max-age=31536000; includeSubDomains; preload. The max-age directive specifies how long (in seconds) the browser should remember to enforce HTTPS. The includeSubDomains directive extends the policy to all subdomains. The preload directive signals that the domain owner wishes to be included in the browser's HSTS preload list — a hardcoded list of domains that browsers will always access over HTTPS, even on the very first visit. Submitting to the preload list is a significant commitment, as removal is slow and can take months to propagate through browser releases.

Deploying HSTS requires confidence in your HTTPS setup. If your certificate expires or becomes misconfigured while HSTS is active, users will be completely unable to access your site, because the browser will refuse to fall back to HTTP. This makes certificate monitoring and automated renewal even more critical.

Certificate Pinning: Benefits and Risks

Certificate pinning is a technique where an application is configured to accept only specific certificates or public keys for a given domain, rather than trusting any certificate signed by a trusted CA. This provides strong protection against compromised CAs and man-in-the-middle attacks using fraudulently issued certificates.

However, pinning has fallen out of favor for web applications. HTTP Public Key Pinning (HPKP) was a standard that allowed sites to pin their certificates via an HTTP header, but it was deprecated by browsers due to the severe risks it posed. If a site pinned to a certificate that was then lost or rotated, users could be permanently locked out. Attackers could also exploit HPKP to hold sites hostage by setting malicious pins.

Certificate pinning remains useful in mobile applications and other controlled environments where the developer manages both the client and the server and can coordinate certificate rotations carefully. In those contexts, pinning provides a meaningful additional layer of defense. For web applications, Certificate Transparency and careful CA selection provide a less dangerous approach to mitigating CA compromise risks.

Putting It All Together

The TLS certificate ecosystem is a complex but well-engineered system that underpins the security of the modern web. Understanding the handshake that establishes a secure connection, the chain of trust that validates identities, and the operational practices that keep certificates current is essential knowledge for any developer or administrator managing web infrastructure. Tools like the Certificate Decoder, SSL Checker, CSR Generator, and Self-Signed Certificate Generator make it practical to inspect, validate, and generate certificates without memorizing arcane OpenSSL command-line invocations. Whether you are deploying a production site, debugging a trust error, or simply trying to understand the padlock icon in your browser, a solid grasp of TLS certificates gives you the confidence to navigate the secure web with authority.

Related Tools

Related Articles

Try Our Free Tools

200+ browser-based tools for developers and creators. No uploads, complete privacy.

Explore All Tools