Skip to content
Tech

What Is an IP Address? IPv4, IPv6 and Hosting Explained

A plain-English guide to IP addresses: how they work, IPv4 versus IPv6, public and private addresses, and what they mean for your website.

By Mike Updated November 5, 2026 5 min read

An IP address (Internet Protocol address) is a numerical label that identifies a device or server on a network, so data can be sent to the right place. Every website you visit, and every phone or laptop you use, has one while it is connected. Domain names exist so people do not have to remember these numbers: DNS translates a name such as tremhost.com into the IP address of the server behind it.

How an IP address works

Data on the internet travels in small packets. Each packet carries a source IP address (where it came from) and a destination IP address (where it is going). Routers along the way read the destination address and pass the packet towards it, much as a postal service reads the address on an envelope. When the reply comes back, it is addressed to your device’s IP address.

When you type a website address, your device first asks a DNS resolver for the site’s IP address. It then connects to that address. You see a name; the network uses the number. For more on the name side, read what is a domain name.

IPv4 and IPv6

There are two versions of IP address in use.

IPv4

IPv4 addresses are 32 bits long and written as four numbers from 0 to 255 separated by dots, for example 192.0.2.10. That allows roughly 4.3 billion addresses. Because the internet has far more devices than that, IPv4 addresses are scarce, and the free pools held by the regional registries have largely run out. This is one reason servers usually come with a limited number of IPv4 addresses.

IPv6

IPv6 addresses are 128 bits long and written as eight groups of hexadecimal digits separated by colons, for example 2001:db8:85a3::8a2e:370:7334. Groups of zeros can be shortened with a double colon. IPv6 provides an enormous number of addresses and is being adopted gradually. For now, most networks run both versions side by side.

Public and private IP addresses

Public IP addresses are reachable on the internet. Your internet provider gives one to your home or office router, and a web server has one so visitors can reach it.

Private IP addresses are used inside a local network and are not routed on the public internet. The reserved IPv4 private ranges are:

  • 10.0.0.0 to 10.255.255.255
  • 172.16.0.0 to 172.31.255.255
  • 192.168.0.0 to 192.168.255.255

Your router gives each device at home or in the office a private address, then uses Network Address Translation (NAT) to let them all share the router’s single public address. That is why your laptop might show 192.168.1.20 while websites see a different, public address.

Static and dynamic IP addresses

Dynamic addresses are assigned automatically and can change, usually by DHCP on your router or by your internet provider. Most home connections and phones use dynamic addresses.

Static addresses stay the same. Servers need static addresses, because DNS records point to a fixed IP. If the address changed, the domain would point to the wrong place.

IP addresses and web hosting

Shared IP addresses

On shared hosting, many websites usually share one IP address. The web server reads the domain name the visitor asked for and serves the correct site. With SNI (Server Name Indication), each site on a shared IP can still have its own SSL certificate, so a shared IP is fine for almost all small business websites.

Dedicated IP addresses

A dedicated IP belongs to one server or one account. It is useful when you run your own server, need to reach it directly before DNS is set up, run services other than websites, or want full control of your mail server’s sending reputation. Every Tremhost KVM VPS includes one IPv4 address.

Pointing a domain at an IP

To connect a domain to a server, you create an A record (for IPv4) or an AAAA record (for IPv6) in DNS. When you change these records, the update can take some time to be seen everywhere because resolvers cache the old answer. The Tremhost Help Centre explains how to edit DNS records and how long DNS changes take.

How to find your IP address

  • Your public IP: search “what is my IP” in a search engine, or visit any IP-check site.
  • Your private IP on Windows: open Command Prompt and run ipconfig.
  • Your private IP on macOS or Linux: check network settings, or run ip addr or ifconfig in a terminal.
  • A website’s IP: run nslookup example.com or ping example.com from a terminal.

IP addresses and privacy

Websites you visit can see your public IP address. It can reveal your approximate location, often only to the city or the provider’s region, and your internet provider. It does not reveal your name or street address on its own. A VPN or a proxy replaces the IP that websites see with the provider’s address.

For website owners, IP addresses are also a security tool. Firewalls and services such as Cloudflare can block or challenge traffic from addresses that behave suspiciously, and server logs record the IP behind each request.

Frequently asked questions

Can two devices have the same IP address?

Two devices can have the same private IP address if they are on different local networks. On the public internet, a single public address can be shared by many devices behind NAT, but two separate networks should not both use the same public address at the same time.

Does my website need a dedicated IP address?

Most do not. Shared hosting with SNI supports SSL on a shared IP. A dedicated IP matters mainly for servers you manage yourself and some specialist services.

Why did my IP address change?

Most home and mobile connections use dynamic addresses that your provider can reassign, for example when your router restarts. Servers use static addresses so this does not happen.

Is an IP address the same as a MAC address?

No. A MAC address identifies a network card on the local network and is fixed to the hardware. An IP address identifies a device’s location on a network and can change.

Next step

If you need a server with its own IPv4 address and full root access, compare the Tremhost KVM VPS plans, with data centres in Johannesburg, Europe and the United States.

Ask us on WhatsApp