CyberCumbria
Cyber Basics • Lesson 06

Understanding HTTP & HTTPS

Every time you visit a website, your browser and a web server exchange messages. Discover how that communication works and what HTTPS does to protect it.

What is HTTP?

HTTP stands for Hypertext Transfer Protocol. It defines how web clients and servers exchange requests and responses.

Your browser

Sends an HTTP request

→
Web server

Processes the request

→
HTTP response

Returns content and a status code

HTTP commonly uses TCP port 80, although other ports and transport arrangements are possible.

What does your browser actually send?

When you open a website, your browser requests a resource. A simple HTTP request might look like this:

GET / HTTP/1.1
Host: cybercumbria.co.uk
Accept: text/html

GET is an HTTP method used to retrieve a resource. The Host header identifies the requested hostname.

GET

Retrieve a resource.

POST

Submit data for processing.

PUT

Create or replace a resource.

DELETE

Request removal of a resource.

Understanding HTTP status codes.

Servers return status codes indicating the outcome of a request.

200OK — request succeeded
301Moved permanently
302Temporary redirect
403Forbidden
404Resource not found
500Internal server error
Security tip: A 200 response means the HTTP request succeeded. It doesn't automatically prove that a sensitive file was exposed. Always inspect what was actually returned.

HTTP versus HTTPS.

HTTP

Ordinary HTTP does not encrypt its messages. Anyone able to intercept the traffic may be able to read or modify it.

Common port: TCP 80.

HTTPS

HTTPS protects HTTP communication using TLS, providing encryption, integrity and server authentication.

Common port: TCP 443.

Modern HTTP/3 uses QUIC over UDP rather than the traditional TCP transport.

What happens during a TLS connection?

Before exchanging protected HTTP messages, the browser and server establish a secure connection.

01 The browser contacts the server and negotiates TLS.
02 The server presents its TLS certificate.
03 The browser validates the certificate and hostname.
04 The connection establishes shared encryption keys.
05 Protected HTTP communication begins.

This is a simplified explanation of a typical modern TLS connection. The precise handshake depends on the negotiated protocol.

What does the browser padlock guarantee?

A valid HTTPS connection indicates that your connection to the authenticated website is encrypted and protected against undetected tampering.

Important: HTTPS does not guarantee that a website is trustworthy. Phishing websites can also obtain valid TLS certificates.

Always check the actual domain name. Encryption protects the connection, not your judgment about the website you're visiting.

Extra protection for websites.

Web servers can send security-related HTTP headers that instruct browsers to apply additional protections.

HSTS Instructs browsers to use HTTPS for future connections.
CSP Restricts which resources a page can load.
X-Content-Type-Options Helps prevent MIME-type sniffing.
Referrer-Policy Controls how much referrer information is shared.

These protections complement HTTPS but don't replace secure application development.

What can web server logs reveal?

HTTP access logs help analysts identify suspicious requests, scanning activity and unexpected responses.

198.51.100.25 - - [04/Oct/2026:18:00:00 +0000]
"GET /.env HTTP/1.1" 403 153

This example shows a request for a potentially sensitive environment file. The server returned 403, indicating that the request was forbidden.

Investigation: Examine the requested path, source IP, response code, response size and surrounding activity. A status code alone doesn't tell the whole story.

Inspect HTTP response headers.

From a terminal with curl installed:

curl -I https://cybercumbria.co.uk

The -I option requests response headers. Look for the HTTP status code, content type and security headers.

curl -IL http://cybercumbria.co.uk

The -L option follows redirects. This lets you examine the redirect from HTTP to HTTPS, if one is configured.

HTTPS protects the connection.

HTTP defines web communication.

TLS protects that communication.

HTTPS combines them.

A secure connection is essential, but it doesn't automatically make a website or its content safe.

Understanding network packets.

Next we'll explore how data is divided into packets and travels across networks.