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.
| Port | Protocol | Name | What it is for |
|---|---|---|---|
| 80 | TCP | HTTP | Unencrypted web traffic. Still the default port a browser tries when no scheme is given. |
| 8000 | TCP | HTTP alternate | A common development port — Django, Python `http.server`, many others. |
| 8080 | TCP | HTTP alternate | The 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
- What port does HTTPS use?
- What port does FTP use?
- What port does DHCP use?
- What port does Docker use?
- What port does MQTT use?
- What port does SSH use?
- What port does RDP use?
- What port does MySQL use?
- What port does PostgreSQL use?
- What port does SQL Server use?
- What port does Oracle use?
- What port does MongoDB use?
Port 80 in full · Port 8000 in full · Port 8080 in full · Every service · All port numbers