Common port numbers explained: 80, 443, 22, 8080, 3389 and the rest
A single computer can run a web server, an email server and a remote login at the same time. The IP address gets a message to the right machine; the port number, from 0 to 65535, gets it to the right program on that machine.
What a port is
Think of an IP address as a block of flats and a port as the flat number. Every connection names both, plus a protocol: TCP for most things (it guarantees delivery and order) or UDP for things that prefer speed, like DNS lookups, games and calls. Ports below 1024 are the “well-known” ones assigned to standard services; 1024 to 49151 are registered for particular programs; above that are temporary ports your own device picks for its side of each connection. Wirebook's What is a port? has the gentle version, and its anatomy of a URL lesson shows where the port hides in a web address.
The ports you will actually meet
| Port | Protocol | Used for |
|---|---|---|
| 20, 21 | TCP | FTP file transfer (old, unencrypted; SFTP over port 22 has replaced it) |
| 22 | TCP | SSH remote login, SFTP and Git over SSH |
| 25 | TCP | Mail servers passing email to each other (many home connections block it) |
| 53 | UDP/TCP | DNS, turning names into IP addresses |
| 67, 68 | UDP | DHCP, the router handing out addresses |
| 80 | TCP | HTTP, plain websites (today mostly a redirect to HTTPS) |
| 123 | UDP | NTP, keeping clocks in sync |
| 143, 993 | TCP | IMAP, reading email (993 is the encrypted one) |
| 443 | TCP (and UDP for HTTP/3) | HTTPS, secure websites and most app traffic |
| 465, 587 | TCP | Sending email from a mail app (encrypted submission) |
| 1194, 51820 | UDP | OpenVPN and WireGuard VPNs (common defaults) |
| 3306, 5432 | TCP | MySQL and PostgreSQL databases |
| 3389 | TCP | Windows Remote Desktop |
| 5353 | UDP | mDNS, finding printers and speakers on the home network |
| 3000, 5000, 5173, 8000, 8080, 8443 | TCP | Development servers and alternative web ports (Node, Flask, Vite, Django, proxies) |
| 6379, 27017 | TCP | Redis and MongoDB |
| 25565 | TCP | Minecraft Java servers |
These are conventions, not rules: any program can listen on any free port, which is why a port number alone never proves what is running there.
Why URLs hide the port
https://example.com/ really means https://example.com:443/, and http:// means port 80. Browsers drop the default, so you only see a port when it is unusual: http://localhost:3000 while building a website, or :8080 on a router or camera page. The URL encoder and parser splits any address into scheme, host, port and path.
See which program is using a port
# Windows (PowerShell or cmd)
netstat -ano | findstr :8080
tasklist /FI "PID eq 1234"
# macOS / Linux
lsof -i :8080
sudo ss -ltnp | grep 8080 # Linux
“Address already in use” means another program, often an earlier copy of the same server, is still holding the port; see EADDRINUSE: address already in use.
Open ports and safety
- Your router blocks incoming connections by default; nothing on your laptop is reachable from the internet unless you port-forward it.
- Only forward what you need, never Remote Desktop (3389), databases or admin pages. A VPN or a tunnel is safer than an open port.
- Turn off UPnP on the router if you do not need games or apps to open ports automatically.
- Behind carrier-grade NAT (see public vs private IP) port forwarding cannot work at all.
Related
Port forwarding not working? Double NAT and CGNAT · Public vs private IP address · Log in to your router (192.168.1.1) · Wi-Fi connected but no internet · Find a saved Wi-Fi password
Questions
What is port 443 used for?
HTTPS: secure websites and most app traffic. Browsers use it automatically for https:// addresses, which is why you never see :443.
What is the difference between port 80 and 443?
Port 80 carries plain, unencrypted HTTP; port 443 carries encrypted HTTPS. Most sites now answer on 80 only to redirect you to 443.
What is port 8080?
A common alternative web port used by development servers, proxies, routers and cameras when port 80 is taken or needs admin rights.
What is port 22?
SSH, used for secure remote logins to servers, SFTP file transfer and Git over SSH.
How do I see what is using a port?
On Windows run netstat -ano | findstr :PORT and look up the PID with tasklist. On Mac or Linux run lsof -i :PORT, or ss -ltnp on Linux.
Is it safe to open ports on my router?
Only open what you need. Never expose Remote Desktop, databases or admin pages; use a VPN or tunnel instead.
Published .