IPv4 vs. IPv6

Category: Networking & IP ยท Updated 2026-10-31

IPv4 and IPv6 are two versions of the Internet Protocol used to address and route traffic across the internet. IPv4 uses 32-bit addresses written as four numbers separated by dots, such as 192.0.2.1, which allows for roughly 4.3 billion unique addresses, while IPv6 uses 128-bit addresses written as groups of hexadecimal digits separated by colons, providing an address space large enough that exhaustion is not a practical concern.

Address format and size

IPv4IPv6
Address length32 bits128 bits
Example192.0.2.12001:0db8:85a3::8a2e:0370:7334
Total possible addressesAbout 4.3 billionAbout 340 undecillion (far more than needed)
Written asFour decimal numbers separated by dotsGroups of hexadecimal digits separated by colons

Why IPv4 ran out of room

When IPv4 was designed, nobody expected billions of phones, servers, smart devices and routers all needing their own address. The pool of available IPv4 addresses has been effectively exhausted for years now, which is why technologies like NAT (Network Address Translation) became standard: NAT lets many devices on a home or office network share one public IPv4 address, at the cost of extra complexity and some features that work less cleanly, such as certain peer-to-peer connections.

What IPv6 changes beyond having more addresses

IPv6 was built with the exhaustion problem in mind, so most devices can get their own unique, publicly routable address without relying on NAT at all. The packet header is also simplified compared to IPv4, which can make routing slightly more efficient, and IPv6 includes built-in support for automatic address configuration, so a device can often generate a valid address for itself on a network without a separate DHCP server.

Dual-stack: how the two coexist today

Because IPv4 and IPv6 are not directly compatible with each other, most networks, hosting providers and operating systems run dual-stack, meaning a server or device holds both an IPv4 and an IPv6 address at the same time and uses whichever the other side of the connection supports. This lets older IPv4-only visitors and devices keep working normally while newer, IPv6-capable connections use the newer protocol, without anyone needing to choose one or the other.

What this means for a hosting account

  • Most hosting providers assign an IPv4 address by default; IPv6 support varies by plan and provider, so check before assuming it is included.
  • A website needs a DNS AAAA record pointing to its IPv6 address, alongside the usual A record for IPv4, to be reachable over both.
  • SSL certificates and most hosting software work identically regardless of which IP version a visitor connects over.
  • Dropping IPv4 entirely is not realistic yet, since a meaningful share of visitors and networks are still IPv4-only or IPv4-primary.

Frequently asked questions

What is the main difference between IPv4 and IPv6?

IPv4 uses 32-bit addresses, allowing about 4.3 billion unique addresses, while IPv6 uses 128-bit addresses, providing a vastly larger pool that is not expected to run out. IPv6 addresses also look different, written in hexadecimal groups separated by colons instead of four dotted decimal numbers.

Why did we run out of IPv4 addresses?

IPv4's 32-bit design only allows about 4.3 billion addresses, and the explosive growth of connected devices worldwide used up that pool faster than anyone expected when IPv4 was created, leading to its effective exhaustion.

Do I need IPv6 for my website?

Not strictly. Most hosting still works fine over IPv4 alone, especially with dual-stack support at the network level, but adding IPv6 support, where your host offers it, lets visitors on IPv6-only networks reach your site directly.

What is dual-stack?

Dual-stack means a server or network device has both an IPv4 and an IPv6 address active at the same time, so it can communicate with visitors or other servers using whichever protocol they support.

Is IPv6 more secure than IPv4?

IPv6 was not designed primarily for security, though it reduces reliance on NAT, which can simplify some security setups. Actual security still depends mainly on firewalls, configuration and software, not the IP version in use.

Can IPv4 and IPv6 devices talk to each other directly?

Not directly; the two protocols are not natively compatible. Communication between them relies on translation or tunneling techniques, or more commonly on both sides using dual-stack so each can fall back to a protocol the other supports.

Related topics