HTTPS (Hypertext Transfer Protocol Secure) is an extension of the Hypertext Transfer Protocol (HTTP) that uses Transport Layer Security (TLS) — formerly known as SSL — to encrypt communication for secure data transfer. Unlike standard HTTP, which transmits requests and responses in plain text, HTTPS wraps traffic in an encrypted layer that protects credentials, session tokens, and form data from interception and tampering. It also verifies server identity so visitors know they are connecting to the legitimate host rather than an imposter.
How it works
When a browser connects to an HTTPS URL, it initiates a TLS handshake before exchanging any application data. During this handshake, the server presents a digital certificate issued by a trusted Certificate Authority (CA) containing its public key and domain identity.
The client validates the certificate against its local trust store, checks that the domain name matches, and confirms the certificate has not expired or been revoked. Both sides then negotiate cipher suites and use asymmetric cryptography to derive shared symmetric session keys. Once established, all HTTP headers and payloads are encrypted using those fast session keys, ensuring confidentiality and data integrity throughout the session.
Beyond basic privacy, HTTPS is a prerequisite for modern web standards and browser APIs:
- Modern transport protocols: Browsers require encryption to negotiate
HTTP/2andHTTP/3, which enable multiplexing and lower connection latency. - Browser security features: Service workers for
Progressive Web Apps (PWA), geolocation, clipboard access, andWebAuthnpasskeys only function in secure contexts. - Transport enforcement: The
HSTS(HTTP Strict Transport Security) response header instructs browsers to refuse plain HTTP connections and prevent protocol downgrade attacks.
Example
A production reverse proxy typically listens on port 80 to redirect unencrypted traffic permanently to port 443, where TLS termination occurs. Below is a minimal Nginx server block demonstrating certificate configuration and HSTS enforcement:
server {
listen 80;
server_name example.com https://www.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name example.com https://www.example.com;
ssl_certificate /etc/letsencrypt/live/https://example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/https://example.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
}
What matters when choosing a server or hosting
When evaluating hosting platforms or configuring your own virtual private server, pay attention to how certificate lifecycle management and TLS termination are handled:
- Automated certificate provisioning: Look for built-in ACME support (such as Let's Encrypt integration) that automatically issues and renews certificates without manual intervention.
- Modern protocol support: Ensure the server stack or CDN edge supports
TLS 1.3andALPN(Application-Layer Protocol Negotiation) so clients can negotiate HTTP/2 or HTTP/3 in fewer round trips. - TLS termination architecture: Decide whether encryption terminates at a load balancer or reverse proxy (simplifying backend scaling) or passes end-to-end to the application server for stricter compliance requirements.
Common mistakes
- Serving mixed content: Loading images, stylesheets, or scripts over plain
http://inside an HTTPS page triggers browser warnings or causes active resources to be blocked outright. - Incomplete certificate chains: Failing to configure intermediate CA certificates alongside the leaf certificate causes validation failures on mobile devices and non-browser API clients.
- Missing renewal automation: Relying on calendar reminders to renew short-lived certificates frequently leads to unexpected outages when a certificate expires unnoticed.
- Enabling HSTS prematurely: Setting a long
max-ageheader before verifying that all subdomains support HTTPS can lock users out of unencrypted internal tools or legacy endpoints.
FAQ
Is SSL still used in HTTPS?
Technically, no. Secure Sockets Layer (SSL) was deprecated due to cryptographic vulnerabilities and replaced by Transport Layer Security (TLS). People still use "SSL certificate" colloquially, but modern servers run TLS 1.2 or TLS 1.3.
Does HTTPS hide the entire URL from network observers?
No. While HTTPS encrypts the URL path, query parameters, headers, and page content, the domain name remains visible during DNS lookups and in the Server Name Indication (SNI) field of the initial TLS handshake unless Encrypted Client Hello (ECH) is supported by both client and server.
Does enabling HTTPS slow down a website?
Modern hardware-accelerated cryptography makes TLS overhead negligible. In practice, HTTPS is usually faster than plain HTTP because it unlocks HTTP/2 and HTTP/3 multiplexing.