Blog / How the internet works /

Public vs private IP addresses

Check your phone’s IP address in Wi-Fi settings and you’ll see something like 192.168.1.23. Then search “what is my IP” in a browser and get a completely different number.

Neither is wrong. One is your private address, the other is public. Understanding the split explains a lot about how home and office networks work.

The short answer

  • A public IP address is how the wider internet sees your network. It’s unique across the internet.
  • A private IP address is used inside your own network (home, office, café). The same private addresses are reused by millions of networks around the world.

Think of a block of flats. The building has one street address that the postal service knows (public). Inside, each flat has a number (private). Flat 4 exists in thousands of buildings, and nobody gets confused, because the street address tells you which building you mean.

Why private addresses exist

IPv4, the older address format, only has about 4.3 billion addresses. That sounds like a lot until you count every phone, laptop, TV, smart speaker and camera. There aren’t enough for each device to have a unique public address.

The solution is to let every home or office share one public address, and give each device inside a private one. For a closer look at the addresses themselves, see what an IP address is and what it reveals about you.

The private ranges

Three blocks of IPv4 addresses are reserved for private use. They’re never routed across the public internet:

Range Typical use
10.0.0.0 to 10.255.255.255 Large organisations, some home routers
172.16.0.0 to 172.31.255.255 Mid-size networks
192.168.0.0 to 192.168.255.255 Most home routers

If your device’s address starts with 192.168, 10. or 172.16 to 172.31, it’s private. Another range, 169.254.x.x, means a device couldn’t get an address from the router and assigned itself one, usually a sign of trouble.

How private devices reach the internet: NAT

Your router does a trick called NAT (network address translation). When your phone asks for a web page:

  1. The request leaves your phone with its private address.
  2. The router swaps that for the router’s public address, remembers which device asked, and sends the request out.
  3. The reply comes back to the public address.
  4. The router looks up who asked and passes it to the right device.

It’s like a hotel reception forwarding calls. Outsiders ring the hotel’s main number, and reception connects them to the right room.

For choosing and setting up the router itself, see router settings worth changing on day one.

Side effects worth knowing

A basic barrier

Because outsiders can’t start a connection to a private address, NAT acts as a rough shield. Devices behind it aren’t directly reachable unless you open a path. It isn’t a firewall, but it helps.

Hosting from home is harder

If you want to reach a device at home from outside, such as a home server or a camera, you need to tell the router to forward a port, and your public address may change over time. That’s covered in home servers: hosting from your own house, why your home IP address changes and dynamic DNS explained.

Many users share one public address

Some mobile networks and ISPs go further and put whole neighbourhoods behind one public address, called carrier-grade NAT. That can make remote access or port forwarding impossible, and means a single public address can represent many people. For website owners, it’s a reason not to treat an IP address as one person.

Conflicts

If two devices on the same network get the same private address, one drops off. It’s rare, but it happens with manual settings. Likewise, a VPN or office network using the same range as your home network can cause confusing routing trouble.

How to see both

  • Private: in your device’s Wi-Fi details, or by running ipconfig (Windows) or ifconfig/ip a (Mac/Linux).
  • Public: visit a “what is my IP” site, or compare it with the address shown on your router’s status page. If the router shows a different “WAN” address from the one the website reports, you’re behind carrier-grade NAT or another layer.

Where it matters for website owners

  • Server logs show visitors’ public addresses. Many people may share one, and one person may use several as they move between networks. See what an IP address is and what it reveals about you and IP addresses and privacy.
  • Security rules that allow only your IP into an admin panel break when your address changes.
  • Staging or internal tools shouldn’t rely on a private address being “hidden”; use proper authentication.
  • DNS records for a public website need a public address. A private address in an A record won’t work for outsiders.

What about IPv6?

IPv6 has an enormous number of addresses, so devices can have public ones without sharing. Many networks run both IPv4 and IPv6 at once. You’ll still often use private addressing with NAT on IPv4, while IPv6 devices may be directly addressable but protected by the router’s firewall.

Key takeaways

  • Public addresses are unique on the internet; private ones are reused inside networks.
  • Private ranges: 10.x.x.x, 172.16-31.x.x and 192.168.x.x.
  • NAT lets many private devices share one public address.
  • Your public address may change or be shared with others.
  • Don’t assume one IP address equals one person.

Open your router’s status page and compare its public address with what a lookup site tells you. Do they match?