# What is HTTPS?

> HTTPS is HTTP wrapped in TLS: encryption, integrity, and usually server authentication on the wire.

Source: https://fullbytedeveloper.com/blog/what-is-https
Published here: 2026-12-03, updated 2026-12-03

HTTPS is HTTP over a TLS-protected connection [1]. Clients and servers still speak HTTP methods, status codes, and headers; TLS adds encryption, integrity, and (on the public web) server authentication underneath [1][2]. Pair with [what is a server](/blog/what-is-a-server) for the host that terminates the connection.

## Fetch headers over TLS in under a minute

```bash
curl -sI https://example.com | head -8
```

Captured output:

```text
HTTP/2 200 
date: Thu, 03 Dec 2026 12:14:00 GMT
content-type: text/html; charset=utf-8
server: cloudflare
last-modified: Tue, 01 Dec 2026 18:03:11 GMT
allow: GET, HEAD
accept-ranges: bytes
age: 3
```

The `https` scheme tells curl to open TCP, run a TLS handshake, then send HTTP inside the encrypted channel [1][2]. You still see ordinary status lines and headers after decryption on the client.

## Read a certificate subject on this host

MDN: when TLS wraps HTTP, the combination is called HTTPS [2]. Encryption keeps bytes unreadable to passive observers on the path; integrity detects tampering; authentication lets the client verify the server certificate against the hostname [2].

```bash
echo | openssl s_client -connect fullbytedeveloper.com:443 -servername fullbytedeveloper.com 2>/dev/null \
  | openssl x509 -noout -subject -issuer -dates
```

Captured fields:

```text
subject=CN = fullbytedeveloper.com
issuer=C = US, O = Google Trust Services, CN = WE1
notBefore=Nov  6 20:17:16 2026 GMT
notAfter=Feb  4 21:17:14 2027 GMT
```

The `subject` names the host the cert claims to represent. The browser checks that name against the URL you typed and walks the chain to a trusted anchor [2]. Expiry dates matter in incident response: a forgotten renewal breaks every client at once.

## Draw the stack

<figure>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 300" role="img" aria-label="HTTP messages ride inside a TLS record layer over TCP">
  <defs>
    <marker id="arrowHttpsStack" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto">
      <path d="M0,0 L8,3 L0,6 Z" fill="#14b8a6"/>
    </marker>
  </defs>
  <rect x="0" y="0" width="720" height="300" rx="12" fill="#0b1f3a"/>
  <rect x="160" y="24" width="400" height="48" rx="8" fill="#123052" stroke="#14b8a6" stroke-width="2"/>
  <text x="220" y="54" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">app: GET /path  Host: example</text>
  <path d="M360 72 V96" stroke="#14b8a6" stroke-width="3" fill="none" marker-end="url(#arrowHttpsStack)"/>
  <rect x="120" y="104" width="480" height="64" rx="8" fill="#123052" stroke="#f59e0b" stroke-width="2"/>
  <text x="200" y="132" fill="#f59e0b" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">TLS: encrypt + integrity + server auth</text>
  <text x="240" y="156" fill="#cbd5e1" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">this wrapping is HTTPS [1][2]</text>
  <path d="M360 168 V192" stroke="#14b8a6" stroke-width="3" fill="none" marker-end="url(#arrowHttpsStack)"/>
  <rect x="160" y="200" width="400" height="40" rx="8" fill="#123052" stroke="#64748b" stroke-width="2"/>
  <text x="250" y="226" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">TCP (often port 443)</text>
  <path d="M360 240 V264" stroke="#14b8a6" stroke-width="3" fill="none" marker-end="url(#arrowHttpsStack)"/>
  <text x="280" y="284" fill="#cbd5e1" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">IP routing to origin or CDN</text>
</svg>
</figure>

*Same HTTP semantics as cleartext HTTP; the carriage changes [1].*

## Walk the handshake in plain steps

On a new connection, client and server negotiate TLS version and cipher suite, prove identity (server cert on the public web), and derive keys for later records [2]. Teaching target today is TLS 1.3 for new deployments; MDN lists older versions as deprecated for production use [2].

Rough order for TLS 1.3 (names vary by stack):

1. ClientHello with supported ciphers and key shares.
2. ServerHello, certificate chain, key agreement.
3. Both sides derive traffic keys.
4. HTTP requests and responses flow as TLS application data.

You rarely hand-roll this in application code. You configure the web server or platform (Cloudflare, nginx, Caddy) and fix cert or chain errors when monitors alert. Certificates commonly come from a public CA (Let's Encrypt and others) or from a host that provisions them for you [2]. Private CAs exist inside companies; trust stores on laptops must include those roots or browsers show warnings.

## Close the loopholes after TLS works

Serve HTML and subresources over HTTPS [2]. Mixed content (an HTTPS document loading active HTTP scripts) lets an attacker swap script bytes on the insecure hop. Browsers block or upgrade those loads [2].

Redirect `http://` to `https://` at the edge. HTTP Strict Transport Security (HSTS) tells browsers to skip the cleartext first hop on later visits for that host [2]. That does not replace fixing hard-coded `http://` links in your own templates.

Wrong DNS still sends TLS to the wrong machine even with a valid cert for another name. Split debugging: resolution, TCP, TLS name match, then HTTP status. The long-running host that answers is still a server process ([what is a server](/blog/what-is-a-server)).

## How HTTPS differs from other protections

HTTPS protects the path between client and the TLS endpoint. It does not encrypt data at rest on the server. It does not stop the server operator from logging requests. A VPN tunnels IP traffic; HTTPS secures one application conversation to a host [1].

Developer APIs over HTTPS still need auth headers, rate limits, and input validation. TLS is necessary on the public internet; it is not sufficient for authorization logic. Interactive shells and `git@` remotes use SSH user keys instead of browser TLS ([SSH keys for developers](/blog/ssh-keys-for-developers)).

## Certificates, hostnames, and SANs

Modern certs often list several DNS names in Subject Alternative Name (SAN) fields. A cert for `www.example.com` does not automatically cover unrelated subdomains unless listed [2]. Wildcard certs (`*.example.com`) cover one label, not arbitrary depths.

Certificate transparency logs and OCSP or stapled revocation checks are operational details operators care about. Application authors mainly need the correct hostname on the cert matching the URL bar.

## HTTP/2 and HTTP/3 over TLS

`HTTP/2` and `HTTP/3` are still HTTP semantics with different framing. HTTP/2 multiplexes streams on one TLS connection. HTTP/3 uses QUIC over UDP with integrated encryption. Your mental model stays: method, path, status, headers, body [1].

## Operate HTTPS in development

Local `https://localhost` may use self-signed certs. Browsers warn until you trust a local CA (mkcert) or click through once. CI jobs hitting staging need the same trust store as laptops or they fail TLS verify while a browser works.

Never disable TLS verify globally in production scripts to silence errors. Fix trust or use the right hostname on the cert.

Browsers default `https://` to port 443. Cleartext HTTP often uses port 80. Nothing forbids TLS on other ports; you might see `https://host:8443` in admin panels. Reverse proxies terminate TLS at the edge and speak plain HTTP to a loopback upstream. The client still sees HTTPS if the proxy is what the browser reached first.

## When TLS succeeds but HTTP fails

A valid TLS session does not guarantee `200 OK`. You can complete a handshake and still receive `404`, `502`, or a redirect to another host. Split incidents: cert and name first (`openssl s_client` or browser cert viewer), then HTTP status and body. Staging cutovers often show good TLS with wrong virtual host routing.

Cookie `Secure` flags assume HTTPS delivery. Session cookies set on mixed sites leak on cleartext subresources unless every form and script path is locked to HTTPS [2].

## Load balancers and re-encryption

Load balancers may terminate TLS at the edge and speak plain HTTP to a loopback upstream, or re-encrypt to backends. Health checks sometimes skip TLS to a local port. Document which hop provides authentication when you debug cert mismatches. The process listening on 443 is still a server ([what is a server](/blog/what-is-a-server)); the certificate subject must match the name clients type [2].

## Mistakes that confuse the lock icon

Treating the lock icon as a content safety badge. TLS authenticates the hostname on the cert chain, not editorial trustworthiness [2].

Expecting HTTPS to hide your traffic from the site operator. The server decrypts every byte. Logs and databases still see requests [1].

Serving login pages over HTTPS but posting credentials to `http://` endpoints. Mixed form actions leak secrets on the downgrade hop [2].

Forgetting renewals. Automated ACME helps; monitoring expiry prevents surprise outages [2].

Using TLS 1.0 or 1.1 because an old client demands it. MDN marks them unsuitable; update clients or isolate legacy paths [2].

Calling a public HTTPS URL "private." TLS protects against many network attackers, not against tracking by the page itself [1].

Disabling TLS verification in production scripts to silence a staging cert error. Fix trust or the hostname instead.

## What you have now

HTTPS as sourced HTTP-plus-TLS, a header sample, and a cert subject line measured on this host [1][2]. Fix mixed content and renewals after the handshake works. For shell and git remotes, use [SSH keys for developers](/blog/ssh-keys-for-developers) instead of browser TLS.

Browse the [Dev explainers topic](https://fullbytedeveloper.com/blog/topic/dev-explainers).

Send this to the friend who thinks the lock icon means the website content is trustworthy.

Image: Transparent cylindrical tunnel bridging a thin teal-edged slab on the left and a large black cube with gold edge highlights on the right, with teal and gold arrows pointing opposite ways inside the tunnel on a dark grid.
https://fullbytedeveloper.com/media/what-is-https/what-is-https-venice.webp
HTTP messages still travel both ways; TLS is the protected pipe that carries them between client and server.

## Sources

1. [MDN Glossary: HTTPS, accessed 2026-12-03](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS)
2. [MDN: Transport Layer Security (TLS), accessed 2026-12-03](https://developer.mozilla.org/en-US/docs/Web/Security/Transport_Layer_Security)
3. [Full Byte Developer: What is a server](https://fullbytedeveloper.com/blog/what-is-a-server)
4. [Full Byte Developer: SSH keys for developers](https://fullbytedeveloper.com/blog/ssh-keys-for-developers)
