Skip to content
Free website migration on every plan, done by our team.Learn more ›
Guides

Public vs private IP addresses: what they are and why it matters

The difference between public and private IP addresses, the private ranges (10, 172.16, 192.168), how NAT and CGNAT work, and what it means for your website.

Short answer: A public IP address is reachable from the whole internet and is what websites see when you visit them. A private IP address only works inside a local network, such as your home Wi-Fi or an office. Private ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Your router uses NAT to let all your private devices share one public address.

When you check your IP address on your phone and then on your laptop, you might see two different answers, or the same one. That is because devices have a private address on the local network and share a public address on the internet. Our What is my IP? tool shows the public one.

Public IP addresses

A public IP address is unique on the internet. Regional internet registries hand blocks of them to internet providers and hosting companies, who assign them to customers. Every website's server has one (or sits behind one), which is what your domain's A record points to.

Public addresses can be:

  • Static: the same every day. Servers need these, so the domain always points to the right place.
  • Dynamic: changed by your provider from time to time. Most home and mobile connections work this way.

Private IP addresses

Private ranges were set aside (in RFC 1918) for use inside networks, and they are never routed on the public internet:

RangeCIDRTypical use
10.0.0.0 to 10.255.255.25510.0.0.0/8Large company networks, cloud networks
172.16.0.0 to 172.31.255.255172.16.0.0/12Company networks, Docker
192.168.0.0 to 192.168.255.255192.168.0.0/16Home and small office routers

Other special ranges you may see:

  • 127.0.0.1 (127.0.0.0/8): loopback, meaning "this computer".
  • 169.254.x.x: link-local, a device giving itself an address because it couldn't get one from the router.
  • 100.64.0.0/10: shared address space used by providers for carrier-grade NAT (below).

Anything in these ranges is useless outside its own network: if you see 192.168.1.20 in a tutorial, it means "a device on that person's home network", not a server you can reach.

How NAT lets devices share one address

Network Address Translation (NAT) is what your router does when a device on your Wi-Fi visits a website. The router swaps the private source address for its own public address, remembers the conversation, and sends the reply back to the right device. To the website, every device in your house looks like one public IP.

Carrier-grade NAT (CGNAT) does the same thing at your mobile or internet provider: many customers share a single public IPv4 address. It is common on mobile networks because IPv4 addresses ran short. The side effects:

  • You can't host anything reachable from home on a CGNAT connection.
  • If someone else sharing your address misbehaves, a website may block or challenge the address you share.

IPv6 avoids most of this, because there are enough addresses for every device. See IPv4 vs IPv6.

Why it matters for your website

  • Allow lists. If you only allow your own IP into cPanel, SSH or a database, use your public address, and remember it may change if it is dynamic.
  • Locked out of an admin page. Moving from Wi-Fi to mobile data changes your public IP. If a login page suddenly blocks you, that is often why.
  • Logs and analytics. Your server's access logs record visitors' public IPs, which count as personal data under laws like the GDPR and NDPA.
  • Hosting at home. Without a public, preferably static, address, a server at home can't be reached reliably. Our guide on hosting a website at home explains the limits.

To see who an address belongs to, its network and country, use the free IP address lookup.

Frequently asked questions

Is 192.168.1.1 a public IP address?

No. 192.168.x.x is a private range. 192.168.1.1 is commonly the address of a home router on its own network, and it can't be reached from the internet.

Why do my phone and laptop show the same IP address?

On the same Wi-Fi, they share your router's public address through NAT. On mobile data, your phone uses the mobile network's address instead, often shared with other customers through CGNAT.

Does a website see my private IP address?

Normally no. Websites see the public address your traffic comes from. Your private address stays inside your local network.

Do I need a static IP address for a website?

Your server does, so your domain always points to it. Hosting providers give servers static addresses; your own home or office connection doesn't need one to manage a website.

Ready when you are

Host it where it performs

NVMe speed, offshore privacy and a written SLA — live in minutes on AuroxHost.