Networking · Lesson 7 of 14
HTTP, HTTPS & TLS
How web requests work, what HTTPS and TLS protect, what certificates prove, and why the padlock doesn’t mean a site is safe. Includes an interactive URL inspector.
⏱ 14 min🎯 Beginner🧪 Hands-on practice
By the end, you’ll be able to…
- Describe an HTTP request and response, including methods and status codes
- Explain what TLS protects and what it doesn’t
- Explain what a certificate proves and why the padlock isn’t a trust badge
Key words
- HTTP
- HyperText Transfer Protocol: the language browsers and web servers speak.
- HTTPS
- HTTP inside an encrypted TLS connection.
- TLS
- Transport Layer Security: encrypts the connection and checks the server’s identity.
- Certificate
- A signed file proving a server controls a domain name.
- Certificate authority (CA)
- An organisation browsers trust to issue certificates, like Let’s Encrypt.
- Status code
- A 3-digit number in a response, like 200 (OK) or 404 (Not Found).
HTTP: request and response
Every time your browser loads something, it sends a request and gets a response. A simple request looks like this:
GET /lessons/ HTTP/1.1
Host: tuxflare.com
User-Agent: Mozilla/5.0 …
Accept: text/html
And the server answers:
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Set-Cookie: theme=dark
<!doctype html> …
Methods
GET asks for something. POST sends data, like a form. PUT and DELETE update or remove things, mostly in APIs.
Status codes
- 2xx success: 200 OK
- 3xx redirect: 301 Moved Permanently, 302 Found
- 4xx your mistake: 401 Unauthorized, 403 Forbidden, 404 Not Found
- 5xx server’s mistake: 500 Internal Server Error, 503 Service Unavailable
You can watch all of this live: open your browser’s Developer Tools (F12), go to the Network tab, and reload this page.
The problem with plain HTTP
Plain HTTP is readable by anyone on the path: the café Wi-Fi, your ISP, or anyone who can see the traffic. They could read your password or even change the page on the way.
HTTPS = HTTP + TLS
TLS wraps HTTP in a protected tunnel. It gives you three things:
- Encryption: people in the middle can’t read the content.
- Integrity: they can’t change it without the change being detected.
- Authentication: you’re talking to a server that controls the domain name you typed.
During the TLS handshake, the server shows a certificate signed by a certificate authority your device trusts. Your browser checks that the certificate matches the domain, hasn’t expired, and has a valid signature chain. Then both sides agree on keys using public-key cryptography, and switch to fast symmetric encryption.
Free CAs like Let’s Encrypt made HTTPS normal. Today most web traffic is encrypted.
The padlock is not a trust badge
This is the big one. The padlock means the connection to this domain is encrypted. It does not mean the domain is honest. Phishing sites get free certificates too. https://paypa1-secure-login.com can have a perfectly valid padlock.
Always check the domain, not just the padlock.
What HTTPS doesn’t hide
- Which IP address you’re connecting to.
- Usually, the domain name (from DNS lookups and the TLS handshake’s server name).
- How much data you send and when.
It does hide the page path, the content, cookies and form data.
🧪 Hands-on
Practice
Type a web address. Tux will break it into parts and point out anything suspicious.
✅ Check yourself
Quick quiz
🔗 Go further
Trustworthy resources
- MDN: HTTP overview Mozilla’s complete, readable HTTP guide.
- Let’s Encrypt: How it works How free certificates are issued.
- Cloudflare: What is HTTPS? HTTPS and TLS explained simply.