DNS Fundamentals

IPv4 vs IPv6: What's the Difference and Why It Matters

9 min read · Updated 2026-06-19

Every device on the internet needs an address so traffic knows where to go. Today two versions of that address coexist: IPv4, the original scheme from the early 1980s, and IPv6, its much larger successor. You have almost certainly used both today without noticing.

This guide explains how the two formats differ, why IPv6 had to be invented, how the internet runs both at once, and how all of it connects back to DNS through A and AAAA records.

What an IP address actually is

An IP address (Internet Protocol address) is a numeric label assigned to every device that talks on a network. It plays two roles at once: it identifies a host and it tells routers how to reach it, much like a street address identifies a building and helps the mail find it.

When you visit a website, your computer does not connect to a name like example.com directly. It first asks DNS to translate that name into an IP address, then opens a connection to that address. The version of IP determines what those addresses look like and how many of them can exist.

IPv4: the original 32-bit scheme

IPv4 uses 32-bit addresses, written as four numbers (called octets) separated by dots, each ranging from 0 to 255 — for example 198.51.100.10. This dotted-decimal format is the one most people recognize.

Thirty-two bits gives 232, or roughly 4.29 billion unique addresses. In 1981 that felt limitless. But once phones, laptops, servers, cameras, and countless other devices all needed to be online, the supply ran short. The regional registries that hand out address blocks began exhausting their free pools in the 2010s, and IPv4 addresses are now a scarce, traded commodity.

IPv6: 128 bits and a much bigger space

IPv6 expands the address from 32 bits to 128 bits. That yields 2128 possible addresses — about 3.4 × 1038, a number so large it is effectively inexhaustible for any foreseeable use.

An IPv6 address is written as eight groups of four hexadecimal digits, separated by colons, for example 2001:0db8:0000:0000:0000:0000:0000:0001. Because that is tedious, two abbreviation rules keep it readable:

  • Drop leading zeros within any group: 0db8 becomes db8, and 0000 becomes 0.
  • Collapse one run of all-zero groups into a double colon ::. This may be used only once in an address, because otherwise it would be ambiguous how many zero groups it stands for.

Applying both rules, the address above shortens all the way to 2001:db8::1.

IPv4 vs IPv6 side by side

The two protocols solve the same problem but differ in nearly every detail:

PropertyIPv4IPv6
Address size32 bits128 bits
FormatDotted decimal (198.51.100.10)Hex, colon-separated (2001:db8::1)
Total addresses~4.29 billion (232)~3.4 × 1038 (2128)
NATWidely used to stretch the address poolRarely needed; every device can have a public address
HeaderVariable length, more fieldsFixed 40-byte base header, streamlined for faster routing
AutoconfigurationTypically via DHCPBuilt-in stateless autoconfiguration (SLAAC), plus DHCPv6

IPv6 was deliberately designed to remove pain points that had accumulated around IPv4, not just to add more addresses.

Why IPv6 exists

IPv6 exists primarily because the world ran out of IPv4 addresses. Before it arrived, engineers extended IPv4's life with two major workarounds, both of which are still in use:

  • NAT (Network Address Translation) lets many devices behind a router share a single public IPv4 address. Your home network almost certainly does this. It conserves addresses but breaks the original idea that any host can reach any other directly, complicating peer-to-peer and incoming connections.
  • CIDR (Classless Inter-Domain Routing) replaced the rigid old class-A/B/C blocks with flexible prefixes like 203.0.113.0/24, so address space could be allocated in right-sized chunks and routing tables stayed manageable.

These bought time, but they treated the symptom. IPv6's enormous address space is the actual cure: enough addresses to give every device a unique, publicly routable identity without resorting to NAT.

How IPv4 and IPv6 coexist today

There is no flag-day switchover. The two protocols run alongside each other, and most of the internet supports both:

  • Dual-stack means a host, server, or network runs IPv4 and IPv6 at the same time, choosing whichever the other end supports.
  • Happy Eyeballs (RFC 8305, updating RFC 6555) is the browser behavior that races an IPv6 connection against an IPv4 one and uses whichever responds first, so a slow or broken path on either protocol does not stall the page.
  • CGNAT (carrier-grade NAT) is NAT applied at the ISP level, sharing one public IPv4 address among many customers — a common stopgap where IPv4 is scarce.
  • Tunneling wraps one protocol's traffic inside the other to cross networks that only speak one of them.

For most users the result is invisible: your connection quietly uses IPv6 where available and falls back to IPv4 where it is not.

How this maps to DNS: A and AAAA records

DNS is where IP versions become concrete for a domain. Two record types do the address mapping:

  • An A record points a hostname at an IPv4 address, such as 198.51.100.10.
  • An AAAA record (spoken "quad-A") points a hostname at an IPv6 address, such as 2001:db8::1. The four A's are a nod to IPv6 addresses being four times the size of IPv4's.

A dual-stack site publishes both: an A record and an AAAA record for the same name. A visitor's device then picks the protocol it can use. For the full mechanics, see the dedicated guide on A and AAAA records.

Practical implications for site owners

If you run a website, the practical question is whether to add an AAAA record so IPv6 users can reach you natively. In most cases the answer is yes, if your hosting and CDN support it:

  • A large and growing share of users — especially on mobile networks — reach the internet over IPv6. Serving them natively avoids extra CGNAT hops.
  • Major hosts and CDNs offer IPv6 by default or as a one-click option, so adding an AAAA record is often trivial.
  • Publishing both A and AAAA is safe thanks to dual-stack and Happy Eyeballs: clients that cannot use IPv6 simply use the A record.

The one rule worth following: only publish an AAAA record if that IPv6 address actually works end to end. A broken IPv6 path can slow some users down before they fall back to IPv4, so test before you ship it.

Seeing a domain's or IP's addresses on who.is

You can inspect all of this directly:

  • Run a domain through the DNS lookup to see its published A records (IPv4) and AAAA records (IPv6) side by side, along with the rest of its zone.
  • Take any address — IPv4 or IPv6 — to the IP lookup to see who it is allocated to, which network announces it, and where it routes.
  • For the registration details behind a domain name itself, use the WHOIS lookup.

Comparing a domain's A and AAAA records is the quickest way to tell whether a site is IPv4-only or fully dual-stack.

Key takeaways

  • IPv4 uses 32-bit addresses (about 4.29 billion total) written in dotted decimal like 198.51.100.10; that pool is exhausted.
  • IPv6 uses 128-bit addresses (about 3.4 × 10^38 total) written in hex like 2001:db8::1, with leading zeros dropped and one run of zero groups collapsed to "::".
  • IPv6 exists to escape IPv4 exhaustion and the NAT/CIDR workarounds that papered over it.
  • The two coexist via dual-stack, Happy Eyeballs, CGNAT, and tunneling — usually invisibly.
  • A records map names to IPv4, AAAA records map names to IPv6; dual-stack sites publish both.
  • IPv6 is not automatically faster — it is usually comparable, occasionally better-routed.

Look up an IP address

Run a WHOIS/IP lookup on any IPv4 or IPv6 address to see who it belongs to and where it routes.

Open tool →

Frequently asked questions

Is IPv6 faster than IPv4?

Not inherently. For most connections IPv6 performs about the same as IPv4. IPv6 can be faster when it avoids extra NAT or CGNAT hops, or when a provider routes it more directly, but it can also be slower if an IPv6 path is misconfigured. Treat performance as "usually comparable, sometimes better," not "always faster."

Do I need IPv6 for my website?

It is not strictly required — IPv4 still reaches everyone — but adding IPv6 (an AAAA record) is recommended if your host and CDN support it. It serves the growing number of IPv6-first users natively and is low-risk thanks to dual-stack fallback. Only publish an AAAA record once you have confirmed the IPv6 address works end to end.

What does :: mean in an IPv6 address?

The double colon :: is shorthand for one run of consecutive all-zero 16-bit groups. So 2001:db8:0:0:0:0:0:1 can be written 2001:db8::1. It may appear only once in an address, because more than one would make it ambiguous how many zero groups each :: represents.

Will IPv4 stop working?

Not in the foreseeable future. There is no scheduled shutoff. IPv4 and IPv6 run side by side, and a vast amount of the internet is still IPv4-only, so it will remain supported for a long time. The trend is gradual: more traffic moves to IPv6 over time while IPv4 keeps working through dual-stack and CGNAT.

How do A and AAAA records relate to IPv4 and IPv6?

An A record maps a hostname to an IPv4 address (like 198.51.100.10), and an AAAA record maps the same kind of hostname to an IPv6 address (like 2001:db8::1). A dual-stack site publishes both for the same name; the visitor's device chooses which to use. See A and AAAA records for details.

Why are IPv4 addresses running out?

IPv4 has only about 4.29 billion addresses (232), which is far fewer than the number of devices now online. The regional registries exhausted their free pools in the 2010s, and the remaining addresses are scarce and traded. NAT and CIDR stretched the supply, but the lasting fix is IPv6's vastly larger address space.

Keep learning