Toolman

What port does HTTP use?

HTTP uses 80, 8000 and 8080, and which one depends on what you are doing.

One standard port and two conventions for everything that cannot have it.

PortProtocolNameWhat it is for
80TCPHTTPUnencrypted web traffic. Still the default port a browser tries when no scheme is given.
8000TCPHTTP alternateA common development port — Django, Python `http.server`, many others.
8080TCPHTTP alternateThe most common alternative HTTP port: Tomcat, Jenkins, proxies, and anything that cannot bind to 80 without root.

Exposing it

Serve nothing here but a 301 redirect to HTTPS. Add HSTS so browsers stop trying port 80 at all.

Checking it is listening

sudo lsof -i :80          # macOS, Linux
netstat -ano | findstr :80   # Windows
nc -zv host 80               # from elsewhere

An "address already in use" error on a port nothing appears to be holding usually means the socket is in TIME_WAIT rather than that a process has it — the ports reference covers that and the ephemeral range.

Frequently asked questions

What port does HTTP use?

HTTP uses ports 80, 8000, 8080, and they do different jobs. 80: Unencrypted web traffic. Still the default port a browser tries when no scheme is given. 8000: A common development port — Django, Python `http.server`, many others. 8080: The most common alternative HTTP port: Tomcat, Jenkins, proxies, and anything that cannot bind to 80 without root.

Is port 80 safe to expose to the internet?

Serve nothing here but a 301 redirect to HTTPS. Add HSTS so browsers stop trying port 80 at all.

How do I check whether HTTP is listening?

sudo lsof -i :80 on macOS or Linux, netstat -ano | findstr :80 on Windows. From another machine, nc -zv host 80 says whether anything answers.

Other services

Port 80 in full · Port 8000 in full · Port 8080 in full · Every service · All port numbers