Does any of this sound familiar? An online game won’t connect properly, and the fix you find says “you need to open a port.” On a company or school network, you’re told “every port except 443 is blocked.” A programming tutorial says “now open localhost:3000” ── you keep seeing the numbers, but if someone asked “so what exactly is that number?”, most people couldn’t answer.
This article explains what a port number really is, from the ground up. Here is the reveal in one line ── the IP address, the address of a computer, only gets a parcel as far as the destination computer (the building). Inside the building, several clerks are working at the same time, and the port number says which counter the parcel is addressed to. If any of the following rings a bell, read on.
- You’ve been told to “open a port” for a game or a home server, but can’t explain what you’re opening
- You’ve nodded along to “port 443 is blocked” while only pretending to understand
- You’ve never wondered why it’s always 80 and 443 that keep showing up
- You type the “:3000” in
localhost:3000without actually knowing what it means
This article avoids piling on jargon, so beginners can follow along. And it doesn’t stop at how things work: it also covers the practical questions of whether opening a port is safe, and what to do when 443 is blocked.
| Question | Where it’s covered |
|---|---|
| What is a port number, really? | §1 |
| Why do I keep seeing 80 and 443? | §2 |
| What does it have to do with firewalls? | §3 |
| What does “opening a port” actually open? | §4 |
| Is opening a port dangerous? | FAQ Q3 |
| What is the 3000 in localhost:3000? | FAQ Q4 |
In our HTTPS article and our server article, we promised that “port numbers deserve an article of their own.” This is that article.
1. What a Port Number Really Is ── the “Counter Number” That Continues the Address
1-1. The Address Alone Doesn’t Reach the Right Clerk
When you request something on the internet ── say, you open a page ── the request becomes a parcel and travels to the destination computer, guided by an address called the IP address (how those addresses work → our IP address article). But at the headquarters building where the parcel arrives (→ our server article), several clerks are working at the same time: one returning web pages, one holding mail, one answering remote management. It’s the situation from the server article, where “one machine can double as both the web server and the mail server.”
So the address alone is not enough. The parcel reaches the building ── but if nothing says which clerk inside the building the parcel is for, it ends up undeliverable.
1-2. That’s Why an Address Needs a Counter Number Next to It
Picture a city hall. The address gets you as far as the city hall building. But once you step inside, numbered counters line the hall, one per type of business: residence certificates at counter 3, taxes at counter 5. Which counter you line up at is decided not by the address, but by what you came to do.
Internet destinations work in the same two steps. The IP address gets you to the building, and “counter no. X” gets you to the clerk ── that counter number is the port number. The numbers run from 0 to 65535, and a computer keeps open only as many of those counters as its business needs.
A destination has two parts: address + counter number
Parcel's destination: 203.0.113.7 : 443
└─ address ─┘ └no.┘
The address (IP address) … reaches the building (computer)
The counter number (port) … reaches the clerk inside
Inside the headquarters building (counters lined up as in a city hall)
[counter 80] web clerk (postcard mail)
[counter 443] web clerk (secret-box mail)
[counter 25] mail clerk
[counter 22] remote-management clerk
The internet-side addresses, buildings, and gatekeepers that have appeared so far each have an article of their own. If anything here feels unclear, read along with these.
- What is an IP address? ── how the address itself works
- What is a server? ── what the “headquarters” receiving your parcels really is
- What is HTTPS? ── postcard mail versus secret-box mail (HTTP and HTTPS)
- What is NAT? ── the concrete steps of port forwarding, and game NAT types
- What happens without a firewall? ── how the gatekeeper filters traffic
2. The Numbers Mean Something ── Why You Keep Seeing 80 and 443
2-1. The Busiest Counters Have Numbers Agreed On Worldwide
At a city hall, you can check the floor guide at the entrance: “residence certificates ── counter 3.” But internet parcels are sent to buildings all over the world, and checking each building’s floor guide would take far too long. So the numbers of the busiest counters are agreed on worldwide, in advance: “web postcard mail goes to counter 80,” “web secret-box mail goes to counter 443” ── the same numbers in every building. (Numbers reserved by this agreement are called well-known ports.)
The difference between postcard mail and secret-box mail ── that is, between HTTP and HTTPS ── is the theme of our HTTPS article. The reception desks that article called “counter 80” and “counter 443” were exactly these port numbers.
2-2. The Main Numbers and the Clerks at Those Counters
| Number | The clerk at the counter | Note |
|---|---|---|
| 80 | Web clerk (HTTP ── the postcard-mail desk) | Carried in a form anyone can read |
| 443 | Web clerk (HTTPS ── the secret-box desk) | The de facto standard of today’s web |
| 25 / 587 | Outgoing-mail clerk | The counter for sending mail |
| 110 / 993 etc. | Incoming-mail clerk | The counter that opens your inbox |
| 53 | Lookup clerk (DNS) | The inquiry counter for the “phone book” in our DNS article |
| 22 | Remote-management clerk (SSH) | The counter server administrators use |
Behind everyday actions like “viewing a site” or “sending an email,” every parcel is addressed to one of the counters in this table.
2-3. Normally, the Browser Fills In the Number for You
“But I’ve never typed 443 into a URL,” you might think. Quite right ── because the browser normally fills the number in automatically. If the address starts with https://, the parcel is addressed to counter 443; with http://, to counter 80. Even when you never think about it, every destination carries a number.
There are also moments when a human writes the number by hand. The classic example is the practice server a developer runs inside their own PC. The “:3000” in localhost:3000 is exactly that ── a handwritten “addressed to counter 3000” (what localhost itself really is deserves an article of its own).
Normally, the browser fills in the number for you
What you type: https://example.com/
Actual destination: example.com's building : counter 443
△
seeing https://, the browser
fills in 443 automatically
Written by hand: localhost:3000
└─ handwritten "to counter 3000"
3. Protecting by Number ── the Gatekeeper Looks at Which Counter a Parcel Is For
3-1. An Open Counter Is Also an Open Entrance
Counters are convenient ── but every counter you open is one more entrance into the building. The large-scale damage of 2003 described in our firewall article happened precisely because attack parcels from all over the world reached “counters left open” (135 and 445). Leaving unused counters open is the same as forgetting to lock a door you never use.
3-2. So the Gatekeeper Passes or Blocks by the Destination Number
Enter the firewall. The gatekeeper (firewall) looks at the counter number a parcel is addressed to and sorts accordingly: “pass what’s for 443, block the rest.” When your company or school says “every port except 443 is blocked,” this is the policy at work. Open only the counters you need and keep the rest closed ── the basic shape of protecting a building.
The gatekeeper passes or blocks by counter number [parcel for 443] ──> gatekeeper ──> pass ──> [counter 443] web clerk (HTTPS) [parcel for 80] ──> gatekeeper ──> pass ──> [counter 80] web clerk (HTTP) [parcel for 135] ──> gatekeeper ──× block (no parcels for unused counters)
“Closing a port” does not mean “losing that feature.” What’s closed is the receiving desk on the building’s side. Your PC can still go out and ask at counter 443 of other buildings, so browsing works as usual. Closing only hurts when there are parcels that need to come in to your building from outside.
4. What “Opening a Port” Really Is ── Letting Parcels from Outside Reach a Counter Inside
4-1. Your Home Router Blocks Almost Everything Coming from Outside
On a home network, your devices live on the inside of the router. What the outside world sees is only the main switchboard number (the global IP address), so even a parcel addressed by name to “counter X of your PC” gets stopped at the router (this switchboard-and-extensions mechanism → our NAT article). In everyday life, this works in your favor, as a defense.
4-2. Opening a Port Means Handwriting One Line in the Router’s Ledger
But there are times when you want parcels from outside delivered into the house ── connections from online-game opponents, or visitors to a home server. That is what “opening a port” (port forwarding) is for. Its true identity is one handwritten line in the router’s ledger: “when a parcel for counter X arrives, pass it to this device.” It’s not major construction like knocking a hole in a wall ── you’re adding one line to the reception desk’s forwarding rules (the concrete steps, and the game NAT types → our NAT article §4).
4-3. The Order for Suspecting Ports When “It Won’t Connect”
When something won’t connect, there’s no need to suspect ports right away. Narrow it down in this order.
- 1Check the basics firstRule out typos in the URL, a flaky line, and an outage on the other side (→ the checklist in our server article §4).
- 2Look for a number in the error messageWords like “port,” “443,” or “blocked” make a port-related cause much more likely.
- 3Work out whose side it’s onOn a company or school network, it’s the administrator’s settings (you can’t open it yourself). At home, if connections from outside are needed, it’s port forwarding’s turn.
And don’t open ports without reason. As §3 showed, every counter you open becomes an entrance. Open only the numbers you need, and close them when you’re done ── treat them the way a city hall closes its counters at the end of the day.
Summary ── the 4-Line Essence
- A port number is a counter number: the address (IP address) reaches the building, the counter number reaches the clerk inside ── destinations come in two steps
- The common numbers are agreed on worldwide: web postcard mail is 80, secret-box mail is 443 ── and the browser normally fills them in for you
- An open counter becomes an entrance: which is why the gatekeeper (firewall) passes or blocks parcels by their destination number
- Opening a port is one line in a ledger: a forwarding instruction that passes outside parcels to a device in the house ── open only what you need, close it when you’re done
With this, the story of a parcel’s destination is connected end to end: the address (IP address) → the phone book (DNS) → the building and its headquarters (server) → the counter number (this article). To retrace the whole journey → the series overview.
FAQ
Q1. What is the difference between a port number and an IP address?
A. They are different steps of the destination. The IP address is the address that says which building (computer); the port number says which counter (clerk) inside the building. In city-hall terms: the address takes you to the building, and your business decides whether you line up at counter 3 or counter 5 ── only with both steps does a parcel reach the right clerk.
Q2. Why is HTTPS on port 443?
A. Because a worldwide agreement reserved it that way, in advance. Since “web secret-box mail (HTTPS) goes to counter 443” holds in every building, the browser can send parcels straight to the right counter without checking any floor guide. The number itself carries no deep meaning ── remembering “443 = the HTTPS counter” is plenty.
Q3. Isn’t opening a port dangerous?
A. If you limit which numbers you open and for how long, there’s no need for excessive fear. But as §3 showed, an open counter is an entrance from outside. Open only the numbers your game or server needs, close them when no longer needed, and keep the devices in your house up to date ── those three rules are the basics. If you can’t explain what a number is being opened for, don’t open it.
Q4. What is the 3000 in “localhost:3000”?
A. A handwritten “addressed to counter 3000.” Developers run a practice server inside their own PC to test their work (→ our server article §1-3), and since that practice server waits for requests at counter 3000, the destination gets “:3000” written next to it. What localhost itself really is deserves an article of its own, planned for the future.
Q5. How do I check whether a port is “open” or “closed”?
A. Start with the error message and your administrator. On a company or school network, which numbers pass is up to the administrator’s settings, so asking your admin or help desk is the surest route. At home, your router’s settings page has a “port forwarding” section showing which numbers are passed to which devices. Checking that no counters have been opened without reason is part of the gatekeeper’s job (→ our firewall article).

Leave a Reply