Chapters (12)

A and AAAA records

The short version

  • An A record links a name to an IPv4 address, like 192.0.2.1.
  • An AAAA record links a name to an IPv6 address, like 2001:db8::1.
  • A name can have several of each.
  • The bare domain (example.com) and www.example.com are two separate names. Each one needs its own records.

Two kinds of IP address

In the first chapter, you met IP addresses. There are two kinds in use today, side by side.[1]

IPv4 is the older kind. It is written as four numbers from 0 to 255, with dots between them. For example: 192.0.2.1.[1]

IPv4 addresses are 32 bits long. That turned out to be too few for a growing internet.[1]

IPv6 is the newer kind. It is 128 bits long, so there are far more of them.[1] It is written in up to eight groups, with colons between them.[2] Runs of zeros are usually left out, so addresses look shorter. For example: 2001:db8::1.[2]

Both example addresses on this page come from ranges kept for documents like this one.[3][4]

The A record

An A record holds one IPv4 address for a name.[5] "A" stands for address.

Here is an A record, written the way DNS tools show it:

example.com.    3600    IN    A    192.0.2.1

Read it from left to right:

  • The name is example.com. (with the hidden dot from chapter 2).
  • The number 3600 is the TTL. It is how many seconds a copy may be kept.[5]
  • The letters IN mean "internet".[5] You can ignore this part.
  • The letter A is the record type.
  • The last part is the address.
The name example.com points to two boxes. An A record holding 192.0.2.1, an IPv4 address. An AAAA record holding 2001:db8::1, an IPv6 address.
A records hold IPv4 addresses. AAAA records hold IPv6 addresses.

The AAAA record

An AAAA record does the same job for IPv6. It holds one IPv6 address.[6] People usually say it as "quad-A".

example.com.    3600    IN    AAAA    2001:db8::1

Hosts often ask you to add both. One host explains why: not every network uses IPv6 yet.[7] The A record covers everyone else.

More than one address

A name can have more than one A record. Each record holds one address.[5] AAAA records work the same way.

You can see this on a real lookup. Here is Google's online Dig tool, asked for the A records of example.com:

Google Admin Toolbox Dig, with example.com entered and A selected. The results show two A records, each with a TTL of 5 minutes and an IPv4 address.
An A lookup for example.com returns two addresses. Screenshot: Google Admin Toolbox, captured 2026-10-18.

It shows two A records, each with its own address.

And here are the AAAA records for the same name:

Google Admin Toolbox Dig, with example.com entered and AAAA selected. The results show two AAAA records, each with a TTL of 5 minutes and an IPv6 address.
An AAAA lookup for example.com returns two IPv6 addresses. Screenshot: Google Admin Toolbox, captured 2026-10-18.

The bare domain and www

The bare domain, with nothing in front, has a special name. It is called the apex, or zone apex.[8] For example.com, the apex is just example.com.

www.example.com is a different name. It is a subdomain that happens to start with www. DNS treats it like any other name.

So if you want both to work, both need records. An A record at the apex does nothing for www. If you forget, www can fail while the bare domain works.

example.com has an A record pointing to 192.0.2.1. www.example.com has a dashed line with a question mark leading to No record yet. Each name needs its own record.
The bare domain and www are separate names, so each needs its own record.

Giving the apex its own A record is fine. One of the standards shows this as the way to let a bare domain reach a server.[9]

For www, hosts often ask you to use a different record type, called a CNAME.[7] That is the topic of the next chapter.

Sources

  1. IP address, Wikipedia (accessed 2026-10-18)
  2. IPv6, Wikipedia (accessed 2026-10-18)
  3. RFC 5737: IPv4 Address Blocks Reserved for Documentation, IETF (accessed 2026-10-18)
  4. RFC 3849: IPv6 Address Prefix Reserved for Documentation, IETF (accessed 2026-10-18)
  5. RFC 1035: Domain names - implementation and specification, IETF (accessed 2026-10-18)
  6. RFC 3596: DNS Extensions to Support IP Version 6, IETF (accessed 2026-10-18)
  7. Managing a custom domain for your GitHub Pages site, GitHub Docs (accessed 2026-10-18)
  8. RFC 8499: DNS Terminology, IETF (accessed 2026-10-18)
  9. RFC 1912: Common DNS Operational and Configuration Errors, IETF (accessed 2026-10-18)