HTTP vs HTTPS
Verdict: Use HTTPS for everything. HTTPS is HTTP transmitted over a TLS-encrypted connection — it adds encryption, server authentication, and data integrity at no meaningful performance cost. HTTP should only appear in local development or on internal networks where you explicitly control both ends. Browsers now treat HTTP as insecure by default.
For a deep dive into how TLS works underneath HTTPS, see SSL/TLS Certificates Explained and the What Is TLS? guide.
- •Running a local development server (localhost is not accessible over the internet)
- •Internal service-to-service traffic within a private, fully trusted network (e.g., inside a VPC)
- •Legacy embedded systems where TLS is not supported (treat this as technical debt)
- •Serving any public-facing website or web application
- •Transmitting credentials, personal data, payment information, or session cookies
- •Calling or serving a public API — HTTPS is the internet standard for APIs
- •Ranking in search engines (Google uses HTTPS as a ranking signal)
- •Enabling HTTP/2 or HTTP/3 — both require TLS in all browser implementations
HTTP for local dev and trusted internal networks — HTTPS for everything else, always.
Side-by-Side Comparison
| Aspect | HTTP | HTTPS |
|---|---|---|
| Encryption | None — all traffic is plaintext | ✓ TLS encryption (AES-GCM, ChaCha20-Poly1305) |
| Server authentication | None — no way to verify you are talking to the real server | ✓ Certificate signed by a trusted CA verifies server identity |
| Data integrity | None — traffic can be modified in transit (man-in-the-middle) | ✓ AEAD cipher provides tamper detection |
| Default port | 80 | 443 |
| HTTP/2 and HTTP/3 support | HTTP/1.1 only in all browsers | ✓ HTTP/2 and HTTP/3 require TLS (browser implementations) |
| Browser treatment | Marked as “Not Secure” in Chrome, Firefox, Safari | ✓ Padlock icon; required for Secure cookie flag and Service Workers |
| SEO impact | Negative — Google uses HTTPS as a ranking signal | ✓ Positive ranking signal since 2014 |
| Performance | HTTP/1.1 — slower than HTTP/2 | ✓ HTTP/2 multiplexing makes HTTPS faster overall for multi-resource pages |
| Mixed content | N/A | HTTP sub-resources on an HTTPS page are blocked by browsers |
What HTTP and HTTPS Are
HTTP (Hypertext Transfer Protocol) is the application-layer protocol that browsers and servers use to exchange web content. An HTTP request is plaintext: the method, URL, headers, and body are all transmitted unencrypted. Any network intermediary — an ISP, a CDN, a Wi-Fi router, or an attacker — can read and modify the traffic.
HTTPS is HTTP transmitted over a TLS (Transport Layer Security) connection. The HTTP request and response are identical in structure; the difference is that TLS wraps the connection in an encrypted channel before any HTTP data flows. From the application's perspective, writing code for HTTP and HTTPS is identical — the TLS layer is handled by the web server or reverse proxy.
The “S” in HTTPS stands for “Secure” — specifically:
- Confidentiality — the request and response body, headers, cookies, and URL path are encrypted. An observer on the network can see only the destination IP address and approximate payload size.
- Integrity — TLS's AEAD cipher detects any modification to packets in transit. Man-in-the-middle content injection is not possible.
- Authentication — the server presents a TLS certificate signed by a trusted Certificate Authority. The browser verifies the certificate's hostname matches the URL and the chain of trust leads to a pre-installed root CA.
Why HTTPS Became the Default
HTTPS was historically associated with e-commerce and login pages — the padlock appeared only where sensitive data was transmitted. The rest of the web ran on HTTP. Several converging changes shifted this to “HTTPS everywhere”:
- Free certificates (2015). Let's Encrypt launched in 2015, making trusted TLS certificates freely available with automated issuance and renewal. The cost barrier to running HTTPS on any domain dropped to zero.
- HTTP/2 requires TLS (2015). The HTTP/2 specification allows plaintext use, but all browser implementations require TLS. HTTP/2 multiplexing, header compression, and server push only work on HTTPS. Sites that stayed on HTTP were stuck at HTTP/1.1.
- Google's HTTPS ranking signal (2014). Google started using HTTPS as a ranking signal. HTTP sites gradually lost search visibility relative to HTTPS equivalents.
- Browser “Not Secure” labels (2018). Chrome 68 (2018) began marking all HTTP pages as “Not Secure” in the address bar. Firefox and Safari followed. HTTP pages with form inputs show additional warnings.
- Secure cookie and API features require HTTPS. The
Securecookie attribute (prevents cookies from being sent over HTTP), Service Workers, Web Push, Geolocation API, and camera/microphone access all require a secure context (HTTPS).
What HTTPS Does NOT Protect Against
✗ Server-side vulnerabilities
HTTPS encrypts the connection, not the server. SQL injection, XSS, SSRF, and authentication flaws can all be exploited over HTTPS connections. TLS secures the transport, not the application.
✗ Compromised certificates
If an attacker obtains a valid certificate for your domain (through a CA breach, DNS hijacking, or social engineering), HTTPS provides no protection — the browser sees a valid certificate. Certificate Transparency logs and HSTS help mitigate this.
✗ Data at rest
HTTPS protects data in transit. It does not protect data stored in your database, object storage, or server filesystem. Encryption at rest is a separate concern.
✗ Client identity
By default, HTTPS authenticates the server to the client, not the other way around. A malicious client can still make HTTPS requests. For client authentication, use mutual TLS (mTLS), API keys, or OAuth tokens.
✗ Phishing sites
Phishing and malware sites can and do use HTTPS. The padlock means the connection is encrypted — not that the site is trustworthy. A phishing site at https://paypa1.com with a valid DV certificate will show the padlock.
✗ Traffic metadata
HTTPS encrypts the content of requests but not all metadata. The destination IP address and hostname (via SNI) are visible to network observers. Request timing and approximate payload sizes can also be observed.
Performance: HTTPS Is Actually Faster
A common objection to HTTPS migration is performance overhead. In 2026, this is no longer a meaningful concern:
- TLS handshake overhead is negligible. TLS 1.3 completes in 1 round trip (versus 2 for TLS 1.2). For most connections, the handshake adds < 10 ms, which is dominated by network latency.
- TLS session resumption eliminates repeated handshakes. For returning users, TLS 1.3 0-RTT session resumption and TLS 1.2 session tickets skip the full handshake entirely.
- HTTP/2 makes HTTPS net faster for most pages. HTTP/2 (HTTPS only in browsers) multiplexes all page resources over a single connection, eliminating the head-of-line blocking and parallel connection limits of HTTP/1.1. A page with 30 sub-resources loads faster over HTTPS/HTTP2 than HTTP/HTTP1.1.
- Modern CPUs handle AES-GCM in hardware. AES-NI instructions mean symmetric encryption adds almost no CPU overhead on any server hardware produced in the past decade.
The 2016 research project “HTTPS is faster than HTTP” at httpvshttps.com demonstrated this — the multiplexing advantage of HTTP/2 over TLS consistently outweighed any TLS overhead on real-world page loads.
Common Mistakes When Migrating to HTTPS
✗ Not redirecting HTTP to HTTPS
If your server serves content over both HTTP and HTTPS, users who bookmark or type the HTTP URL will still get an unencrypted connection. Set up a 301 redirect from http:// to https:// for all URLs. Also set HSTS to tell browsers to always use HTTPS for your domain.
✗ Mixed content blocking
After migrating to HTTPS, any sub-resource loaded over HTTP (images, scripts, stylesheets, API calls) will be blocked by the browser. Update all hardcoded http:// URLs in your HTML, CSS, and JavaScript to https:// or protocol-relative (//).
✗ Forgetting to update CORS and API endpoint URLs
Backend APIs called by your frontend, CORS allowed origins, OAuth redirect URIs, and webhook endpoint URLs all need to be updated from http:// to https:// after migration.
✗ Not setting HSTS
HTTP Strict Transport Security (HSTS) tells browsers to always use HTTPS for your domain, even if the user types http:// or clicks an http:// link. Set the Strict-Transport-Security header with a long max-age (at least 1 year). Submit to the HSTS preload list for maximum coverage.
✗ Using verify=False or disabling certificate validation in code
Developers sometimes disable certificate validation to work around issues during development, then forget to re-enable it in production. This eliminates all authentication — the connection is encrypted but you cannot know if you are talking to the real server. Never set verify=False in production code.
✗ Letting certificates expire
An expired certificate causes browsers to block the site with an error that users cannot click through safely. Automate certificate renewal (Certbot, Caddy, or your hosting platform) and set up monitoring alerts at 30 days before expiry.
Try the Tools
All tools run entirely in your browser. No data is uploaded. Browse all DevOps tools →
Frequently Asked Questions
Related Reading
SSL/TLS Certificates Explained
Certificate types (DV/OV/EV), chains of trust, Let's Encrypt, ACME, and common certificate problems.
What Is TLS? (Transport Layer Security)
How the TLS handshake works, forward secrecy, cipher suites, and TLS 1.2 vs 1.3.
DevOps Configuration & Deployment Basics
Full guide covering YAML, DNS, SSL, HTTP headers, cron, and validation workflows.
DevOps & Infrastructure Tools
Browse all browser-based DevOps tools: SSL validator, SSL decoder, DNS, YAML, cron, and more.