Every device on the internet needs an address so data knows where to go. Those addresses are IP addresses, and right now the internet runs on two versions of them at the same time: IPv4 and IPv6.
If you've seen an "AAAA record" in your DNS settings or wondered why some IP addresses look like long strings of letters and colons, this guide is for you. We'll cover the difference between IPv4 vs IPv6, why the switch is happening slowly and what it means for your website.
What is an IP address?
An IP (Internet Protocol) address is a numeric label assigned to a device on a network. It works a bit like a street address for data. When your browser requests a web page, the request is sent to the server's IP address, and the reply comes back to yours.
Humans don't like memorizing numbers, so we use domain names instead. DNS translates a name like example.com into the IP address of the server that hosts it.
What is IPv4?
IPv4 is the original version that has powered the internet since the early 1980s. An IPv4 address is 32 bits long and is written as four numbers separated by dots, each between 0 and 255:
192.0.2.45
32 bits allows for roughly 4.3 billion unique addresses. That sounded like plenty decades ago. It isn't anymore, with billions of phones, computers, servers and smart devices online. The regional registries that hand out IPv4 blocks have long since run through their free pools, and IPv4 addresses are now often bought, sold and leased between organizations.
How IPv4 survived running out
Two tricks have kept IPv4 going:
- NAT (Network Address Translation): Your home router has one public IPv4 address, and every device behind it shares it using private addresses such as 192.168.x.x. Internet providers sometimes add another layer of this, called carrier-grade NAT.
- Shared hosting: Many websites can share a single server IP address, because the web server looks at the requested domain name to decide which site to show.
What is IPv6?
IPv6 was designed as the long-term replacement. Its addresses are 128 bits long and written as eight groups of four hexadecimal characters separated by colons:
2001:0db8:0000:0000:0000:ff00:0042:8329
There are shortening rules, so leading zeros can be dropped and one run of all-zero groups can be replaced by a double colon:
2001:db8::ff00:42:8329
128 bits gives about 3.4 × 10^38 addresses, a number so large that running out isn't a realistic concern. It means every device can have its own globally unique address again.
IPv4 vs IPv6: the key differences
| IPv4 | IPv6 | |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Format | Dotted decimal (203.0.113.10) | Hexadecimal with colons (2001:db8::1) |
| Number of addresses | About 4.3 billion | About 3.4 × 10^38 |
| DNS record type | A record | AAAA record |
| Address configuration | Manual or DHCP | Manual, DHCPv6 or automatic (SLAAC) |
| Reliance on NAT | Very common | Not needed in normal use |
A few other technical differences are worth knowing:
- Simpler headers: IPv6 packet headers have a fixed structure, which can make routing more efficient.
- Built-in autoconfiguration: Devices can assign themselves an address based on network information.
- Security: IPsec support was part of the IPv6 design, though in practice both versions rely on encryption like TLS at higher layers. Neither version is automatically "secure" on its own.
Are IPv4 and IPv6 compatible?
Not directly. An IPv6-only device can't talk to an IPv4-only server without help. That's why most of the internet runs in dual-stack mode: servers, networks and devices have both an IPv4 and an IPv6 address and use whichever works best.
Modern browsers and operating systems handle this automatically. When both are available, they often try IPv6 first and fall back to IPv4 quickly if it doesn't respond. Visitors never notice.
What IPv6 means for your website
For most website owners, the practical questions are simple.
Does my site need IPv6?
Your site will keep working over IPv4 for the foreseeable future, because nearly every network still supports it. Adding IPv6 is a good forward-looking step, though. Some mobile networks are heavily IPv6-based, and serving visitors over IPv6 can avoid an extra translation step on those networks.
How do I enable IPv6?
- Check whether your server has an IPv6 address. Your host or server control panel will show it. Many VPS and dedicated servers include one or a whole block.
- Make sure your web server is listening on IPv6. On a managed or shared plan, the host handles this.
- Add an AAAA record in your DNS pointing your domain to the IPv6 address, alongside the existing A record for IPv4.
- Test it with an online IPv6 test tool or by running
curl -6 https://yourdomain.comfrom a machine with IPv6.
If you're not sure where DNS records live, our guide on nameservers vs DNS records explains it.
Watch out for these gotchas
- Firewall rules: IPv4 and IPv6 often have separate firewall rule sets. If you lock down IPv4 but forget IPv6, you may leave ports open.
- Broken AAAA records: If you publish an AAAA record but the server isn't actually reachable on IPv6, some visitors may see slow loading while their device falls back.
- Email: Mail servers sending over IPv6 need correct reverse DNS and SPF records for that address too, or messages may be rejected.
- Allowlists and logs: Security plugins, admin IP allowlists and analytics should understand IPv6 addresses.
How to find your own IP address
Search "what is my IP" in any search engine, or visit a tool site. If you see a long colon-separated address, your connection is using IPv6. Many connections show both.
On a Linux server, run:
ip addr show
Lines beginning with inet show IPv4 addresses, and inet6 shows IPv6.
Wrapping up
IPv4 and IPv6 do the same job, giving devices addresses so data can find them. IPv4 is older and has effectively run out of new addresses, while IPv6 offers a practically unlimited supply. The internet will run both side by side for years. For your website, the takeaway is simple: keep your A record, add an AAAA record when your server supports IPv6, and make sure your firewall and email settings cover both.