Network security

What Is the Difference Between HTTP and HTTPS? Ports, TLS and Security

HTTP and HTTPS are the same protocol with one crucial difference: HTTPS wraps it in TLS encryption and server authentication. Here is what that changes in practice.

Cysoro Security TeamPublished · 8 min read
http:// port 80plain text, readable https:// port 443encrypted with TLS LOCKED NETWORK SECURITY HTTP vsHTTPS One letter, a sealed envelope.
Quick answer

The difference between HTTP and HTTPS is that HTTP sends requests and responses as plain text on TCP port 80, while HTTPS sends the same HTTP messages inside an encrypted TLS connection on TCP port 443. HTTPS adds confidentiality, integrity protection and server authentication with a certificate, so nobody on the network can read or silently change the traffic, and the browser can check that the server really is the site in the address bar.

Key takeaways

  • HTTPS is HTTP inside TLS: the messages are the same, only the transport is encrypted and authenticated.
  • HTTP uses port 80 and HTTPS uses port 443 by default, as defined in RFC 9110.
  • HTTPS protects data in transit, but it does not make a website trustworthy or fix flaws on the server.

Every web address starts with either http:// or https://, and that single letter decides whether your passwords, cookies and page content travel across the internet as readable text or inside an encrypted tunnel. The two are not rival protocols: HTTPS is HTTP, protected.

What is the difference between HTTP and HTTPS?

HTTP sends web requests and responses as plain text, readable by anyone on the network path. HTTPS sends the exact same HTTP messages inside a TLS connection, so they are encrypted, protected against tampering, and the server must prove its identity with a certificate.

Think of HTTP as a postcard and HTTPS as a sealed envelope whose seal is also verified. The postcard can be read and altered by every courier. The sealed envelope hides the contents, and if anyone opens it in transit, the recipient can tell.

The practical differences are summarized below. The requests themselves do not change: a GET /login request is still a GET /login request. Only how those bytes travel changes.

PropertyHTTPHTTPS
URL schemehttp://https://
Default portTCP 80TCP 443
Encryption in transitNone — plain textYes, with TLS
Server authenticationNoneYes, certificate for the domain
Tampering in transitUndetectableDetected; the connection fails
Certificate requiredNoYes
HTTP/2 in browsersNot supportedSupported
Browser featuresSome blocked (service workers, geolocation)Available

What is HTTP?

HTTP, the Hypertext Transfer Protocol, is the request-response protocol a browser or app uses to ask a server for a resource and receive an answer. Its shared semantics are defined in RFC 9110, published by the IETF in June 2022.

A client sends a request with a method such as GET or POST, a target such as /orders/1042, header fields and sometimes a body. The server answers with a status code, header fields and usually a body. HTTP is stateless: each request can be understood on its own, and logins and shopping carts are built on top with cookies and tokens.

RFC 9110 defines the standard methods GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS and TRACE. It also defines the default ports: an http URL without a port means TCP port 80. HTTP works at the application layer, above TCP, or above QUIC in HTTP/3.

HTTP on its own has no encryption and no way to check who answered. If a network attacker redirects your request to their own machine, the browser has no way to tell, and the response looks equally valid.

What is HTTPS?

HTTPS is HTTP sent through a Transport Layer Security (TLS) connection. The https URI scheme is defined in RFC 9110, which requires that the server be able to establish a TLS connection, and the default port is TCP 443.

TLS adds three guarantees, as Mozilla MDN explains in its TLS documentation.

Confidentiality: after the handshake, client and server share keys that encrypt everything that follows, including the URL path, headers, cookies and body. Integrity: each record carries an authentication tag, so any change in transit is detected and the connection fails. Authentication: the server presents a certificate for its domain and proves it holds the matching private key.

The older document describing HTTP over TLS, RFC 2818 from May 2000, has been folded into RFC 9110. The encryption protocol itself is TLS 1.3, defined in RFC 8446, with TLS 1.2 still in use. TLS 1.0 and 1.1 were formally deprecated by RFC 8996 in March 2021.

How does the TLS handshake work?

Before the first HTTP byte is sent, the browser and server run a TLS handshake to agree on encryption keys and prove the server identity. With TLS 1.3, the full handshake takes one round trip.

TLS 1.3 handshake: one round trip, then encrypted HTTPBrowser1. ClientHello: versions,ciphers, hostname (SNI),key share3. Derives session keys,verifies certificateServer2. ServerHello, certificate,signature, key share4. Encrypted HTTP begins:GET /account, cookies, bodyTLS 1.2 needs one more round trip. HTTP/3 runs the handshake inside QUIC over UDP.
The TLS 1.3 handshake in four steps. Illustration by Cysoro.

First, the browser sends a ClientHello with the TLS versions and ciphers it supports, the hostname it wants, and its half of a key exchange. The server answers with its choices, its certificate and a signature proving it holds the certificate private key. Both sides then derive the same session keys, and only then is the HTTP request sent, encrypted.

In TLS 1.3 the certificate is encrypted, and legacy constructions such as RSA key transport, which offered no forward secrecy, were removed. Forward secrecy means that even if the server private key is stolen later, past sessions cannot be decrypted from recorded traffic.

What does HTTPS hide, and what does it not hide?

HTTPS hides the content of your traffic from anyone on the network path, but it does not hide everything. Knowing the boundary matters, because it decides what a Wi-Fi operator, an ISP or an employer network can still see.

Visible to the networkHidden by HTTPS
The server IP addressThe full URL path and query string
The domain, through DNS lookupsPage content
The hostname in the TLS handshake (SNI), unless Encrypted Client Hello is usedForm data, passwords and cookies
The amount and timing of trafficResponse bodies and headers

That means an observer can often tell which site you visited, but not which page you read or what you typed. Encrypted Client Hello, defined in RFC 9849, closes the hostname leak in the handshake, but it needs support from both the browser and the server.

HTTPS also does not protect data after it reaches the server. The server sees everything, and broken access control or injection flaws work just as well over an encrypted connection. That is why HTTPS is necessary but not sufficient for web security.

Does the padlock mean a website is safe?

No. The padlock, which most browsers now show as a simple icon or omit entirely, means the connection is encrypted and the server proved it holds a certificate for that domain. It says nothing about whether the site itself is honest.

Attackers can get certificates for their own scam domains easily, and many phishing sites now use HTTPS. A fake login page at secure-bank-login.example can show a padlock while stealing your password. Check the domain name itself, not the padlock.

What the padlock does guarantee is useful: nobody between you and that server can read or change the traffic, and you are talking to the server named in the address bar rather than an impostor on the network. That is a transport guarantee, not a trust guarantee.

If a site asks for a password or payment over plain HTTP, stop. Browsers now label HTTP pages as "Not Secure", and any password or card number typed there travels as readable text. You can check a site certificate and headers with our free SSL checker.

How do HTTP/1.1, HTTP/2 and HTTP/3 fit in?

All current HTTP versions share the semantics defined in RFC 9110: methods, status codes and header fields mean the same everywhere, so a 404 is a 404 in every version. What changes is how the messages are carried.

HTTP/1.1 sends plain-text messages, one request at a time per connection, although connections are reused for many requests. HTTP/2 multiplexes many requests over one connection and compresses headers, and browsers only support it over HTTPS. HTTP/3 runs over QUIC, a UDP-based transport with TLS 1.3 built in, so the handshake and the connection setup happen together.

For a site owner, the practical point is that moving to HTTPS unlocks the newer, faster versions of HTTP. For a reader, the version rarely matters: what matters is the https:// at the start of the address and a valid certificate behind it.

How do sites move from HTTP to HTTPS?

Sites move to HTTPS by getting a certificate, configuring the server to serve HTTPS on port 443, and redirecting HTTP requests to HTTPS. The redirect alone is not enough, because the first HTTP request is still sent in plain text before the redirect arrives.

The fix for that weak spot is the Strict-Transport-Security (HSTS) response header. Once a browser has seen HSTS for a domain, it will only connect over HTTPS in future, even if the user types http:// or clicks an HTTP link. Site owners can also submit their domain to the HSTS preload list built into browsers.

Mixed content is another trap: an HTTPS page that loads images, scripts or styles over HTTP. Browsers block the most dangerous mixed content, such as scripts, because it would let an attacker change the page. Check for mixed content and missing HSTS with our free security headers checker.

Same cafe Wi-Fi, two very different viewsHTTP: everything visibleGET /account?user=mariaCookie: session=abc123Password: hunter2An attacker can read it all,and change the page.HTTPS: only the domain visibleEncrypted bytes: 9f 3a c1 ...Path, cookies and passwordsare hidden inside TLS.Tampering is detected andthe connection fails.The site still sees everything. HTTPS protects data in transit only.
What an attacker on the same Wi-Fi can see over HTTP versus HTTPS. Illustration by Cysoro.

When is HTTP still acceptable?

HTTP is acceptable only for public, non-sensitive content where nobody logs in and nothing private is sent — and even then, most sites have moved to HTTPS because certificates are free and browsers now penalize HTTP.

A local test server on your own machine, a captive portal login page before you have internet access, and some embedded devices are the remaining cases where HTTP still appears. For anything on the public internet, treat HTTP as a warning sign rather than a normal choice.

If you run a site, the migration checklist is short: get a certificate, serve HTTPS on port 443, redirect HTTP to HTTPS, set HSTS, fix mixed content, and renew the certificate automatically. Most hosting platforms now do the first two steps for you. Our guide to how to secure your Wi-Fi covers the network side of the same problem at home.

The bottom line

HTTP and HTTPS are the same protocol with different transport. HTTP sends everything as plain text on port 80; HTTPS wraps it in TLS on port 443, encrypting the traffic and proving the server identity with a certificate.

Use HTTPS everywhere it matters — which is almost everywhere — and remember its limits: it protects data in transit, not the honesty of the site or the security of the server. Check any site certificate in seconds with our free SSL checker.

Frequently asked questions

What is the difference between HTTP and HTTPS in simple terms?

HTTP is like sending a postcard: anyone who handles it can read it. HTTPS is like sending a sealed envelope that also proves who sent it. The contents are the same kind of web request, but HTTPS encrypts them and checks the server identity with a certificate.

What port does HTTP use and what port does HTTPS use?

HTTP uses TCP port 80 by default and HTTPS uses TCP port 443 by default. Those defaults come from RFC 9110. A site can use other ports, but browsers assume 80 for http addresses and 443 for https addresses when no port is given.

Is HTTPS slower than HTTP?

HTTPS adds a TLS handshake before the first request, which costs about one extra round trip with TLS 1.3. After that, modern encryption is fast and the difference is usually too small to notice. HTTPS also enables HTTP/2 and HTTP/3, which can make sites faster overall.

Does HTTPS mean a website is safe?

No. HTTPS only means the connection to the server is encrypted and the server proved it holds a certificate for that domain. A scam site can use HTTPS too. You still need to check that you are on the right domain and that the site itself is trustworthy.

What does HTTPS hide from my Wi-Fi provider or ISP?

HTTPS hides the full URL path, page content, form data, passwords and cookies. It does not hide the server IP address, the domain name in most DNS lookups, or the hostname in the TLS handshake unless Encrypted Client Hello is used.

Do I need a certificate for HTTPS?

Yes. The server needs a certificate for its domain, signed by a certificate authority the browser trusts, plus the matching private key. Free certificates are available from Let's Encrypt, and many hosting platforms issue them automatically.

What is TLS and how is it different from SSL?

TLS is the encryption protocol that secures HTTPS. SSL was its predecessor, created by Netscape in the 1990s. All SSL versions are now deprecated, and TLS 1.2 and TLS 1.3 are the versions in use. People still say SSL out of habit, but modern HTTPS uses TLS.

Can I still use HTTP for a website?

You can, but browsers now mark HTTP pages as not secure and block some features on them, such as service workers, geolocation and camera access. For any site that takes logins, payments or personal data, HTTPS is essential, and for most sites it is now the expected default.

Sources

  1. IETF — RFC 9110: HTTP Semantics
  2. IETF — RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3
  3. Mozilla — MDN: HTTPS
  4. CISA — Securing the Internet
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against RFC 9110, RFC 8446 (TLS 1.3) and Mozilla MDN documentation on HTTPS and TLS.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free