What Is a Port?
An IP address gets data to the right device, but what happens when that device is running multiple applications? Your computer might have a web browser, email client, and video chat all using the network at once. How does incoming data reach the correct application?
That's where ports come in.
Ports as Numbered Channels
Think of ports like extensions on a phone system. A company has one main phone number (the IP address), but different departments have different extensions. When you call, you dial the main number, then enter an extension to reach the right person.
Ports work the same way. They're numbers ranging from 0 to 65535, and each network connection uses a specific port. When data arrives at your device, the operating system looks at the port number to determine which application should receive it.
Common Port Numbers
Certain ports are standardized for specific purposes:
| Port | Purpose |
|---|---|
| 80 | HTTP (web traffic) |
| 443 | HTTPS (secure web traffic) |
| 22 | SSH (secure remote access) |
| 25 | SMTP (email sending) |
| 53 | DNS (domain lookups) |
When you visit a website, your browser connects to port 443 (for HTTPS) or port 80 (for HTTP) on the web server. The server knows to send web content because of the port number.
How Applications Use Ports
When an application wants to receive network data, it "listens" on a specific port. A web server listens on port 443, waiting for incoming connections. When your browser connects to that port, the server responds with the requested webpage.
Your computer also uses ports for outgoing connections. When your browser makes a request, it uses a random high-numbered port (like 52847) for the response to come back to.
Why This Matters
Understanding ports helps you:
- Troubleshoot connection problems ("Is the server listening on the right port?")
- Configure firewalls to allow or block specific traffic
- Understand security concepts (closing unnecessary ports)
- Run multiple services on one server