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

IPv4 vs IPv6: what changes for your website

How IPv4 and IPv6 differ, why IPv4 addresses ran out, how A and AAAA records work, and what to check so your website works over both.

Short answer: IPv4 addresses are 32 bits long (about 4.3 billion addresses, written like 203.0.113.24). IPv6 addresses are 128 bits long (written like 2001:db8::1), enough for every device to have its own. The internet runs both side by side. Your website reaches IPv4 visitors through an A record and IPv6 visitors through an AAAA record; the best setup offers both.

IPv6 isn't new, but it matters more each year as mobile networks and internet providers move to it. Most website owners only need to know what changes in DNS and in their firewall.

Why IPv4 ran out

IPv4 has about 4.3 billion addresses, far fewer than the number of phones, computers and servers online. The central pool of IPv4 addresses was used up in 2011, and the regional registries have been rationing what is left since. Providers stretch the remaining addresses by sharing them between many customers with NAT, which works but makes some things harder (see public vs private IP addresses).

IPv6 fixes the shortage for good: 128 bits gives about 3.4 × 10^38 addresses.

The two formats side by side

IPv4IPv6
Length32 bits128 bits
Written asFour numbers, 0 to 255Eight groups of four hex digits
Example203.0.113.242001:db8:85a3::8a2e:370:7334
DNS recordAAAAA
Typical network size/24 or smaller/64
Sharing addresses (NAT)Very commonNot needed

Reading IPv6 is easier than it looks. Leading zeros in a group can be dropped, and one run of all-zero groups can be written as ::. So 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1. (Addresses starting 2001:db8:: are reserved for examples, like 203.0.113.x in IPv4.)

How visitors reach your site over each

When someone types your domain, their device asks DNS for its addresses:

  • an A record gives the IPv4 address;
  • an AAAA record gives the IPv6 address.

A device that has IPv6 usually tries the AAAA address first and falls back to IPv4 quickly if that fails. A site with both is called dual stack. A site with only an A record still works for everyone, because IPv6-only networks reach IPv4 sites through translation, but it misses the direct route. Check what your domain has with our DNS lookup, and see our guide to IPv6 and AAAA records.

What to check before you add IPv6

  1. Your server really has a working IPv6 address. An AAAA record pointing at an address that doesn't answer is worse than none, because some visitors will wait for it to time out.
  2. The firewall covers IPv6 too. Rules for IPv4 don't automatically apply to IPv6. With UFW, make sure IPV6=yes is set, then check sudo ufw status shows both. See the UFW guide.
  3. The web server listens on IPv6. Nginx needs a listen [::]:443 ssl; line next to listen 443 ssl;; Apache's Listen 443 covers both by default.
  4. SSL works on both. Certificates are for names, not addresses, so the same certificate works; test the site over both after the change.
  5. Email servers need matching reverse DNS. If a mail server sends over IPv6, large mailbox providers expect its IPv6 address to have a PTR record and to be covered by SPF.

Frequently asked questions

Is IPv6 faster than IPv4?

Not by itself. Speed depends on the route and the server. IPv6 can avoid the extra step of shared-address NAT on some mobile networks, which sometimes helps a little.

Do I need IPv6 for SEO?

No. Search engines crawl and rank sites over IPv4 without any penalty. IPv6 is about reaching every visitor directly and being ready as networks move to it.

Can a website have only IPv6?

It can, but visitors on IPv4-only networks wouldn't reach it without a translation service in front. For a public website, offer IPv4 and, where your host supports it, IPv6 too.

How do I find my IPv6 address?

Our What is my IP? tool shows the public address you are using right now, including IPv6 if your network has it.

Ready when you are

Host it where it performs

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