Port 80 — HTTP

Port 80 is the default port for HTTP (Hypertext Transfer Protocol) — the protocol that transfers web pages. When you type http://example.com in a browser and don't specify a port, the browser automatically connects to port 80 on that server. It's the oldest and most universal web port, assigned to HTTP by IANA in the earliest days of the internet.

On your local machine, http://localhost is shorthand for http://localhost:80. Any web server — Apache, Nginx, IIS, Caddy — listens on port 80 unless explicitly configured otherwise.

HTTP default: localhost:80

Why Port 80 Specifically?

Port 80 was assigned to HTTP by the IANA (Internet Assigned Numbers Authority) based on a proposal by Tim Berners-Lee in the early 1990s. At the time, the web was a new application layer on top of an existing internet infrastructure, and well-known port numbers below 1024 were allocated for standard services. HTTP got 80, HTTPS got 443, FTP got 21, SSH got 22, and so on.

The number itself is arbitrary — what matters is that it became the agreed-upon convention. Every HTTP client in the world knows "if no port is specified, try port 80 for http:// and port 443 for https://".

Port 80 Needs Root on Linux/Mac

On Unix-based systems (Linux, macOS), ports below 1024 are "privileged ports" — only processes running as root (or with the CAP_NET_BIND_SERVICE capability) can bind to them. This is why:

  • Web servers like Apache and Nginx are often started with sudo
  • They then drop privileges to a low-privilege user (www-data, nginx) after binding the port
  • Development servers in Node.js, Python, Ruby, etc. typically default to port 3000, 5000, or 8000 instead of 80 — precisely to avoid needing root
# Start Nginx on port 80 (requires sudo on Linux)
sudo nginx

# Use port 8080 instead — no root needed
python -m http.server 8080

# Grant capability without full root (Linux only)
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/node

Port 80 vs 8080

Port 80Port 8080
ProtocolHTTP (default)HTTP (alternate)
Root requiredYes (Linux/Mac)No
Browser omits from URLYes — shows http://domain.comNo — shows http://domain.com:8080
Corporate firewallUsually openSometimes blocked
Common useProduction web serversDev servers, admin panels, proxies

What Uses Port 80

SoftwareRole
Apache HTTP ServerMost popular web server; default port 80
NginxHigh-performance web server and reverse proxy
Microsoft IISWindows web server
CaddyModern web server with automatic HTTPS; handles 80→443 redirect automatically
Docker containersCommon to map container port 80 to host port 8080: -p 8080:80
Let's Encrypt ACMEUses port 80 for HTTP-01 challenges during SSL certificate issuance

HTTP to HTTPS Redirect

Modern practice: web servers listen on port 80 only to redirect to HTTPS on port 443. The browser hits port 80, gets a 301 redirect to https://..., and re-connects on port 443. This redirect is how http://example.com automatically becomes https://example.com.

# Nginx redirect
server {
    listen 80;
    server_name example.com www.example.com;
    return 301 https://$host$request_uri;
}

# Apache .htaccess redirect
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Troubleshooting Port 80

ProblemFix
EACCES: permission denied (binding port 80)Node/Python can't bind ports below 1024 without root — use port 3000 or 8080 for dev instead
Port 80 already in use on WindowsIIS or Skype often claim port 80 — disable IIS or change Skype to not use port 80
Port 80 already in use on MacApache may be running: sudo apachectl stop
Find what's using port 80Linux/Mac: sudo lsof -i :80    Windows: netstat -ano | findstr :80