When you open an HTTPS website, your browser first creates a secure link to its server. Only then does it exchange information, helping prevent sensitive details—such as login credentials and payment information—from being read or altered while they travel.

The SSL handshake establishes that connection. Modern websites actually rely on Transport Layer Security (TLS), which replaced Secure Sockets Layer (SSL), though people still commonly call the process an SSL handshake.

An SSL handshake is the exchange that lets a browser and server set up secure communication. It confirms the website's identity and settles the encryption settings they will use. Developers building secure web applications need to understand this process. Those who want to expand their software development skills can also explore the AI for Software Engineers program.

This guide explains the SSL handshake, breaks down the TLS process, compares TLS 1.2 with TLS 1.3, and covers common errors along with practical fixes.

What Is an SSL Handshake?

An SSL handshake happens before a browser and web server exchange encrypted data. They agree on security settings, verify the server through its digital certificate, and create shared encryption keys for the connection.

Modern HTTPS connections use TLS, not the outdated SSL protocols. During the handshake, the browser and server agree on compatible cryptographic settings, while the browser checks that it is communicating with a server whose identity can be verified.

When you open an online shopping site, your browser and the server complete a TLS handshake before sending account or payment information through HTTPS.

What Does the SSL Handshake Accomplish?

  • Authentication: The website presents a digital certificate that lets the browser check its identity.
  • Encryption: Both sides establish shared keys to protect the data they exchange.
  • Integrity: Cryptographic safeguards help reveal unauthorized changes made while the data is being transmitted.
  • Secure communication: Sets the conditions for a safe exchange between the client and server.

Why does the SSL handshake matter?

The handshake sets the security rules for an HTTPS connection. If the TLS handshake fails, the browser and server cannot move on to exchanging protected application data.

1. Protects Sensitive Information

TLS encryption guards data as it moves between the browser and server. That matters for sites handling passwords, payment details, personal information, or private business data.

2. Verifies Website Identity

During a standard TLS handshake, the server sends a digital certificate. The browser then confirms that a trusted authority issued it, that it matches the requested hostname, and that it has not expired. Those checks make it harder for the browser to connect to an impostor website.

3. Helps Prevent Data Tampering

TLS adds cryptographic protection that lets the recipient detect changes made to the data while it travels across the network.

4. Builds Trust in Web Applications

E-commerce, online banking, SaaS products, and similar services need secure connections whenever they handle sensitive information. Properly configured HTTPS helps protect users and makes the online experience more trustworthy.

How Does an SSL Handshake Work?

During an SSL handshake, the client and server exchange messages to establish a secure connection. The precise sequence varies with the TLS version and the connection's configuration.

A browser opens a typical modern TLS 1.3 handshake with a ClientHello message. The server replies with its chosen connection settings and key-exchange details, then sends authentication information. Once both sides have the required details, they establish the cryptographic keys that protect application data.

Step 1: The Client Sends a ClientHello

When someone opens an HTTPS website, the browser begins the TLS handshake with a ClientHello message addressed to the server. It tells the server which TLS versions and cipher suites the browser supports, along with key-exchange data such as a key share. The message can also carry connection-related extensions and, when relevant, the requested hostname through Server Name Indication (SNI). Application protocol preferences—HTTP/2 or HTTP/1.1, for example—are sent through ALPN. This tells the server which security settings and connection features the client supports.

Step 2: The Server Sends ServerHello

After reviewing ClientHello, the server chooses compatible security parameters. It then returns ServerHello with the selected TLS version, cipher suite, and key-exchange details. In a typical TLS 1.3 handshake, an ephemeral Diffie-Hellman exchange lets both parties derive the same shared secret from their key-exchange data. The secret itself never travels across the network.

Step 3: Server Sends Its Digital Certificate

Once the ServerHello message has been sent, the server provides its authentication details. For a certificate-based handshake, that normally means sending the digital certificate along with the information needed to verify its certificate chain. The certificate records the website's domain identity, its public key, the issuing authority, the period for which it remains valid, and the issuer's digital signature. The browser then checks the certificate chain to confirm that the certificate matches the requested hostname. It also verifies the validity dates and confirms that the certificate leads back to a trusted certificate authority.

Step 4: Server Proves Its Identity

In TLS 1.3, the server generally follows its certificate with a CertificateVerify message. Inside it is a digital signature showing that the server controls the private key paired with the certificate's public key. It then sends a Finished message, confirming the server's view of the handshake and helping detect changes to the handshake transcript.

Step 5: Client Verifies the Server and Completes the Handshake

The browser checks the server's certificate and confirms the authentication messages exchanged during the handshake. Once those checks pass, it sends its own Finished message. At that point, both sides have derived the traffic keys they need. The handshake ends, and the connection can carry protected application data.

Step 6: Encrypted Data Exchange Begins

Once the handshake finishes, application data travels through the TLS connection the browser and server agreed on. For an HTTPS site, TLS protects the HTTP requests and responses.

Take a login form. The browser sends the submitted credentials over the encrypted connection, allowing the server to process them while ordinary network observers cannot read them as plaintext.

SSL Handshake Process: Quick Overview

A typical certificate-based TLS 1.3 handshake unfolds in four steps.

  1. The browser sends a ClientHello containing its supported TLS options and key exchange information.
  2. The server replies with a ServerHello, choosing compatible security parameters and sharing its own key exchange details.
  3. It then sends its Certificate with authentication information.
  4. CertificateVerify proves that the server possesses the certificate's private key.

The connection is ready only after both sides confirm the handshake. They then complete setup and begin exchanging encrypted application data over HTTPS between the browser and server.

Note: This is a simplified overview of a typical TLS 1.3 certificate-based handshake. Some configurations, including resumed sessions that use pre-shared keys, follow a different sequence of messages.

TLS handshake process between a browser and server

SSL vs. TLS: What Sets Them Apart?

SSL and TLS are cryptographic protocols that protect data sent across networks. TLS came later, replacing SSL with stronger security and a better-designed protocol.

People still say "SSL certificate" or "SSL handshake," but current secure websites should run TLS instead. SSL 2.0 and SSL 3.0 are obsolete and should remain disabled on modern servers.

Feature SSL TLS
Full name Secure Sockets Layer Transport Layer Security
Purpose Protect communication across networks Protect communication across networks
Current status Obsolete and insecure The modern protocol family
Security improvements Earlier cryptographic design Stronger cryptography and better protocol protections
Modern HTTPS use Should not be used Used by modern browsers and servers

Why Do People Still Say SSL Handshake?

"SSL" became familiar when websites first began adopting encrypted connections. TLS later replaced it, but the old name stuck in technical documentation, hosting dashboards, certificate products, and search queries.

People may search for an SSL handshake when they actually mean a TLS handshake.

TLS 1.2 vs. TLS 1.3 Handshake

Both TLS 1.2 and TLS 1.3 secure network connections. The main differences lie in the handshake process and the cryptographic options each version supports.

Feature TLS 1.2 TLS 1.3
Handshake design Typically requires more round trips Uses a streamlined handshake
Key exchange Supports several key exchange methods Uses modern ephemeral key exchange in standard certificate-based handshakes
Cryptographic choices Still includes older options that administrators should avoid Eliminates many legacy and weak choices
Session resumption Supports session-resumption mechanisms Uses PSK-based resumption, with optional 0-RTT data
Performance May require extra handshake round trips Aims to cut handshake latency
Comparison of TLS 1.2 and TLS 1.3 handshake processes

How TLS 1.3 Improves the Handshake

TLS 1.3 makes the handshake simpler by dropping support for several outdated cryptographic mechanisms. During a typical full handshake, the client and server can establish the connection in one round trip after the initial ClientHello is sent.

TLS 1.3 can send 0-RTT data when a connection resumes, but that shortcut carries replay risks. Use early data only for operations that can safely be repeated.

What Is the Role of an SSL Certificate in the Handshake?

A digital certificate forms part of a standard certificate-based TLS handshake. It lets the browser check whether the server is connected to the domain the user meant to open.

How Does a Certificate Work?

A certificate comes from a certificate authority (CA) and carries the CA's digital signature. It may also come from an intermediate CA within a trusted certificate chain. The browser checks that chain against its trusted root certificates.

During the handshake, the server sends over its certificate. The browser then checks the requested domain, confirms that the certificate has not expired, and verifies its chain of trust.

What Happens If a Certificate Is Invalid?

An expired or misconfigured certificate can trigger a security warning. The same may happen when it belongs to another domain or the browser cannot verify it through a trusted chain; in some cases, the connection is terminated.

Website administrators need to track certificate expiration dates and verify that each certificate includes the correct intermediate chain.

Common SSL Handshake Errors and Their Causes

An SSL handshake error appears when the client and server fail to finish setting up a TLS connection. Certificate failures, mismatched protocol settings, network interference, or server configuration problems can all cause it.

1. Expired SSL/TLS Certificate

Once a certificate passes its validity period, the browser may reject it during validation. Website administrators should renew certificates before they expire, then verify that the renewed certificate was installed correctly.

2. Certificate Name Mismatch

A certificate has to match the hostname being requested. A certificate issued only for example.com does not automatically cover shop.example.com; that subdomain must be listed on the certificate as well.

3. Unsupported TLS Version

The handshake may fail when the client and server have no TLS version in common. Administrators should allow modern TLS versions and remove obsolete protocols.

4. Cipher Suite Mismatch

The client and server need at least one cryptographic algorithm in common. Without an overlapping cipher suite, the handshake can fail.

5. Incomplete Certificate Chain

If the server omits the required intermediate certificates, certain clients may not be able to establish a trusted certificate chain. Providing the full chain on the server usually fixes the problem.

6. Incorrect System Date or Time

A device's wrong clock can make a certificate appear expired or not yet valid. Check the system's date, time, and time zone to correct the issue.

7. Proxy, Firewall, or Network Interference

Some security tools—such as proxies, firewalls, antivirus software, or network inspection systems—may disrupt TLS connections. Administrators should examine connection logs and review their security rules to pinpoint the cause.

How to Troubleshoot SSL Handshake Failures

When the TLS handshake breaks down, developers and website administrators need to find the failing step in the connection setup. These checks can help narrow it down.

1. Check the Certificate

Confirm that the certificate has not expired and covers the requested hostname. Review its issuer and chain, then make sure the server presents that exact certificate for the domain.

2. Verify TLS Configuration

Inspect the server's TLS settings and confirm that modern protocol versions are enabled. SSL 2.0, SSL 3.0, and other outdated security settings should not be allowed.

3. Review Cipher Suite Compatibility

Make sure the server and client share compatible cipher suites and key-exchange methods, and remove any cryptographic settings that are weak or obsolete.

4. Check Server Logs

Review the web server and application logs for certificate errors, protocol mismatches, failed negotiations, or interrupted connections.

5. Test the Connection

OpenSSL lets developers examine a TLS connection when a certificate or protocol issue needs investigation. Run this command against a server:

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

Substitute the domain you want to check for example.com. The -servername flag sends that hostname through Server Name Indication (SNI), so the server can return the correct certificate.

Inspect the certificate chain and connection details for configuration problems. This command helps diagnose issues; it does not replace a full security audit.

How HTTPS Uses the SSL/TLS Handshake

HTTPS means Hypertext Transfer Protocol Secure. It carries HTTP through a TLS connection, protecting data exchanged between a browser and a web server.

When someone opens an HTTPS website, the browser and server begin by setting up a TLS connection. Once that handshake finishes, HTTP requests and responses move through the encrypted channel.

Example: Visiting an Online Store

A customer types an online store's HTTPS address into a browser. The browser starts the TLS handshake by sending a ClientHello message, and the server answers with its chosen security settings and certificate details. The browser checks the server's identity, then the two sides agree on keys to protect their traffic. Once the TLS handshake finishes, they can exchange encrypted HTTP requests and responses.

That protection keeps login details, payment information, and other personal data private as they move between the customer's browser and the website.

Secure communication matters whenever an application depends on cloud infrastructure. Our cloud architecture guide explains how networking, security, databases, and application services fit together.

Why Software Developers Should Understand SSL/TLS Handshakes

Developers working on websites, APIs, cloud services, or connected applications benefit from knowing how TLS handshakes work. Secure communication is not only a server administration issue; the software itself must communicate safely with external services.

A solid grasp of TLS helps developers set up secure links between applications and APIs, handle certificate validation and trust errors, and track down failed HTTPS connections. It also helps protect data moving between frontend and backend services, secure communication in cloud-based applications, and spot outdated encryption protocols or unsafe settings.

Secure communication is an important part of building reliable server-side applications. Learn more about server-side technologies, APIs, authentication, and application security in our guide to backend development.

WFI's AI for Software Engineers program is designed for developers who want a stronger grounding in modern software engineering. It brings standard development skills together with current AI-assisted engineering methods.

Frequently Asked Questions About SSL Handshakes

1. What is an SSL handshake in simple terms?

An SSL handshake lets a browser and server set up a secure connection. Before protected data moves between them, they agree on security settings, confirm the server's identity, and create encryption keys. Modern websites use TLS for the handshake.

2. How long does an SSL handshake take?

How long it takes depends on network latency, which TLS version is in use, the server's performance, and the connection settings. Compared with older protocols such as TLS 1.2, TLS 1.3 cuts down the round trips required to complete a full handshake.

3. Is SSL still used today?

Not as a current security protocol. SSL 2.0 and SSL 3.0 are obsolete and insecure, while modern HTTPS connections rely on TLS. People still use "SSL" in searches and ordinary technical conversations, though.

4. What distinguishes an SSL handshake from a TLS handshake?

These protocols describe how a secure connection is established across different generations. SSL is the obsolete predecessor to TLS, which is now used to create secure HTTPS connections.

5. What happens if an SSL handshake fails?

The browser and server cannot finish setting up a secure connection. A security warning or connection error may appear in the browser. Typical causes include an invalid certificate, an unsupported TLS version, incompatible cipher suites, or an incomplete certificate chain.

6. Does HTTPS always mean a website is trustworthy?

HTTPS protects the connection and checks the website's domain identity through its certificate. That certificate does not prove the site's content, business, or intentions can be trusted, so users still need to assess websites carefully.

7. What is the difference between an SSL certificate and an SSL handshake?

An SSL/TLS certificate is a digital document that helps authenticate a website. An SSL handshake is the exchange between the browser and server that establishes a secure connection, with the certificate helping authenticate the server.

8. Can an SSL handshake happen without a certificate?

Yes. Certain TLS setups, including some pre-shared-key (PSK) handshakes, can create a secure connection without the standard exchange of server certificates. Regular public HTTPS websites, however, generally use certificates to verify the servers they connect to.

Conclusion

The SSL handshake remains a basic step in creating a secure link between a browser and a web server. People still commonly use the term "SSL," but modern HTTPS connections run on TLS, which negotiates security settings, verifies the server, and creates the encryption keys.

Understanding the TLS handshake gives developers a clearer way to secure applications and diagnose failed connections. It also explains how information stays protected as it travels across the internet, from checking a certificate through the start of encrypted transmission.

Building secure applications is only one step toward becoming a capable software engineer. Our guide to becoming an AI software engineer covers the underlying technical concepts, programming abilities, and a practical path for learning.

As web applications grow more interconnected and complex, software engineers still need a solid grasp of secure communication protocols. WFI's AI for Software Engineers program can help you build skills for current application development.