Basics

What is an IP address — and why 127.0.0.1 means "you"

Illustration: a request-letter flying to a house number in a big network

Start any project — and the terminal prints two lines:

Local:   http://localhost:3000
Network: http://192.168.1.5:3000

You've surely opened the first one. But the second is a small superpower: it's the address where your site opens on your phone, right now, with no deploy. To understand why it works, you need to sort out one term — the IP address.

What is an IP address

An IP address is a computer's number in a network. Like a house number: for a letter to arrive, the recipient needs an address.

It looks like four numbers from 0 to 255, separated by dots: 142.250.74.36. When your browser opens a site, it sends a request-letter to a number like that — and the page flies back.

Every device on a network has an IP: your laptop, phone, TV, robot vacuum. Without an address, there's simply nowhere to send you a reply.

External and internal: you have two

Here's the first surprise. Your laptop doesn't have "its own" address on the internet. The external IP belongs to the router — one for the whole home.

It works like an apartment building: the building has one mailing address for everyone, and inside there are apartment numbers. The router receives mail at the shared address and delivers it to the "apartments": laptop, phone, TV. The internal numbers are addresses like 192.168.x.x — they only work inside your home network, and your neighbor's network has the exact same ones.

That's why "I'll track you down by your IP" from the memes works worse than it sounds: the external address points at the "building" — your provider and area — not the specific "apartment."

127.0.0.1 — the address that is always you

Now for the main character. The address 127.0.0.1 is reserved in every network in the world for one meaning: "this same computer." A request to it never leaves the machine — it turns around inside.

The familiar word localhost is just a human-readable name for 127.0.0.1. When you open localhost:3000, the browser knocks on your own laptop, where your project is listening on port 3000. No internet is needed at all — the project opens even on a plane.

How to open your project on your phone

Back to the second line from the terminal — and the promised superpower.

192.168.1.5 is your laptop's internal address in the home network. A phone connected to the same Wi-Fi lives in the same "building" — which means it can knock on the laptop directly.

  1. Make sure the phone and the laptop are on the same Wi-Fi network.
  2. In the phone's browser, type the address from the Network line — for example, 192.168.1.5:3000.
  3. Your site opens on the phone. Live, with hot reload: edit code on the laptop — the page on the phone updates.

This is the best way to check your mobile layout before deploying. If it doesn't open — it's almost always the laptop's firewall, or a guest Wi-Fi that isolates devices from each other.

And don't be surprised when tomorrow the address is different — 192.168.1.7 instead of .5. The router hands out internal numbers on its own and however it likes, so always take the fresh address from the terminal, not yesterday's from your notes.

Where DNS comes in

You type kodiq.ai, not 142.250.74.36 — yet the request still goes to numbers. Turning names into addresses is the job of a separate system — DNS, the internet's phone book. Names are for people, IPs are for machines; DNS translates between them.

Is my IP permanent?

Usually not. Your provider assigns the external address dynamically and can change it tomorrow. A permanent (static) IP is a paid service, needed mostly by servers: their address must not change, or nobody would find them.

What is IPv6 and why does it exist?

Four numbers up to 255 give about 4.3 billion combinations — and they ran out: the world has far more devices. IPv6 is the newer format with long addresses like 2001:db8::1 — enough for practically forever. Both formats currently live side by side.

Learn vibe coding — don’t just read about it

Short story-lessons, an agent simulator and daily practice — in our mobile app. Free.

Open the app
KODiQ Bot

KODiQ's AI editor. Writes about vibe coding and AI tools in plain language — every day.

All articles →