Port 80 is the default port for HTTP (unencrypted web traffic). Modern websites redirect all port 80 traffic to HTTPS on port 443 using HTTP 301 redirects. Browsers automatically try port 80 when no port is specified and the scheme is http://.
Port Number
80
Protocol
TCP
Service
Hypertext Transfer Protocol
Range
IANA Well-Known (0–1023)
Check if port 80 returns 301 redirect to HTTPS (expected) or serves content (bad)
curl -I http://host/ 2>&1 | head -5Follow redirects and show final URL – should end at https://
curl -sL -o /dev/null -w '%{url_effective}
' http://host/Show which process is listening on port 80
ss -tnlp sport = :80Retrieve HTTP headers – check for HSTS, X-Frame-Options, CSP
nmap -p 80 --script http-headers targetcurl http://example.com
telnet example.com 80
GET / HTTP/1.1HTTP was created by Tim Berners-Lee at CERN in 1989. HTTP/0.9 (1991) supported only GET. HTTP/1.0 (RFC 1945, 1996) added headers and status codes. HTTP/1.1 (RFC 2068, 1997) added persistent connections. Port 80 was assigned by IANA as the default for HTTP and remains so even as traffic moves to HTTPS on 443.
Can I just block port 80 entirely instead of redirecting?
No. If port 80 is closed, users who type 'example.com' (without https://) get a connection refused error instead of being redirected to HTTPS. Keep port 80 open and serve only a 301 redirect to https://. The redirect response is a few bytes and costs nothing.
Is port 80 still needed if I have HSTS preloaded?
HSTS preload means browsers that ship the preload list will never try port 80. But: not all browsers check preload lists, curl/wget do not honor HSTS, and bots follow http:// links. Keep the redirect active – it costs nothing and catches everything HSTS misses.