Skip to content

Cookie settings

Choose which kinds of cookies you allow. You can change your choice at any time via Cookie settings at the bottom of every page. Privacy statement

Necessary

Always on

Needed to log in, keep your cart and remember your choices. These are always on.

Which cookies?
  • weboke_sessie, weboke_klant, weboke_remember: your session and staying logged in
  • weboke_basket: your cart
  • wkBtwIncl: showing prices with or without VAT
  • wok_cookies: your cookie choice, 12 months

Measures which ad leads to a visit or order, so we do not pay for ads that do nothing.

Which cookies?
  • Google Ads via Google Tag Manager (_gcl_au, _gcl_aw), up to 90 days
  • OpenAI Ads, ads in ChatGPT
  • wok_aff: which partner referred you to us (affiliate programme), 60 days

4.6

Country and language

Each country has its own site, with prices and VAT for that country.

View

A and AAAA records

Module 3: Records for your website · Reading time: 7 minutes

Learning objective: After this lesson, you'll be able to point a name to an IPv4 and an IPv6 address, and you'll know what goes wrong if you forget the AAAA record.

Key concepts: A record, AAAA record, IPv4, IPv6, multiple A records, documentation addresses

The most commonly used record

If someone wants to visit your website, the browser needs to know the address of the server. That address is an IP address, and the record that links a name to that address is called the A record (A for address). It's the oldest and most commonly used record in DNS.

An A record looks like this in a zone:

example.com.        3600  IN  A     192.0.2.10
www.example.com.    3600  IN  A     192.0.2.10

Read it from left to right: the name example.com., may be cached for 3600 seconds, in the internet class (IN, you'll almost never see anything else), type A, value 192.0.2.10.

An A record always points to an IPv4 address: four numbers from 0 to 255, separated by dots. There are roughly 4.3 billion of these addresses, which isn't enough for every device on earth. That's why IPv6 exists.

AAAA: the same, but for IPv6

An IPv6 address is much longer: eight groups of four hexadecimal characters, separated by colons. You may replace one sequence of consecutive all-zero groups with ::. The record that links a name to an IPv6 address is called the AAAA record, pronounced "quad-A". The name comes from the fact that an IPv6 address is four times as long as an IPv4 address (128 bits versus 32).

example.com.        3600  IN  AAAA  2001:db8::10
www.example.com.    3600  IN  AAAA  2001:db8::10

A name can have both: an A record and an AAAA record. That's actually the normal situation with modern hosting. A visitor with an IPv6 connection (an increasing number of home networks, and almost all mobile networks) will typically use the AAAA record, while a visitor without IPv6 uses the A record.

In this course, we use the addresses 192.0.2.x, 198.51.100.x and 203.0.113.x for IPv4, and 2001:db8:: for IPv6. These are specially reserved for documentation (RFC 5737 and RFC 3849): they're never assigned to a real server, so an example can never accidentally point to someone's actual server.

The pitfall: the forgotten AAAA record

This often goes wrong in practice. You move your website to a new server, or connect your domain to an online shop platform. You neatly update the A record to the new address. But there was also an AAAA record pointing to the old server, and you leave it as is.

The result: visitors without IPv6 see the new site, visitors with IPv6 (often everyone on 4G or 5G) see the old site, or an error message if the old server is already gone. And because you might not have IPv6 at home, you won't notice anything odd. "It works on my laptop, but not on my phone" is a classic symptom.

So the rule is: if you change the A record, always check the AAAA record too. There are three possibilities:

  1. The new server also has an IPv6 address: point the AAAA record to that new address.
  2. The new server has no IPv6: remove the old AAAA record.
  3. There was no AAAA record: then you don't need to do anything.

Multiple A records for one name

A name can have more than one A record:

example.com.   300  IN  A  192.0.2.10
example.com.   300  IN  A  192.0.2.11

DNS then returns both addresses, and the browser picks one. Large sites use this to spread visitors across multiple servers or to keep running if one fails. For an ordinary website, you usually don't want this: if one of the two addresses is an old server, half your visitors will get the wrong site. Platforms such as online shop builders therefore often explicitly ask: "make sure there's only one A record on your domain".

What is and isn't allowed in an A record

  • The value is always an IP address, never a name. If you want a name to point to another name, you need a CNAME (lesson 3.2).
  • Don't put a dot after an IP address. A trailing dot only belongs to names (lesson 2.2).
  • An A record doesn't contain a port or a path. 192.0.2.10:8080 or 192.0.2.10/shop won't work. DNS only knows where a server is, not which page you want to see (lesson 3.4).
  • For the domain name itself, most panels use @ or you leave the name field empty. For a subdomain, you only fill in the first part, such as www or shop.

In practice: what it looks like in a panel

As an example, we use DirectAdmin, a widely used hosting panel. Other panels (cPanel, Plesk, Cloudflare and the DNS screens of most registrars) label the buttons differently, but the fields are the same everywhere: type, name, TTL and value.

  1. Open DNS Administration and select the right domain.
  2. Click Add Record.
  3. For the type, choose A (or AAAA for IPv6).
  4. Under Name, fill in only the first part, for example shop for shop.example.com. For the domain itself, leave it empty or type @.
  5. Leave the TTL at its default value, for example 3600.
  6. Under Value, fill in the IP address, for example 203.0.113.10.
  7. Save.

You can change an existing record using the pencil icon next to it. Afterwards, check the same list to see whether there's still an AAAA record for the same name.

Summary

  • An A record links a name to an IPv4 address, an AAAA record to an IPv6 address.
  • A name can have both; that's normal with modern hosting.
  • If you change the A record, always check the AAAA record too: otherwise IPv6 visitors will see the old server.
  • The value is always an IP address, without a dot, port or path.
  • Multiple A records for one name are possible, but are usually a mistake for an ordinary website.

Quiz

1. What does an AAAA record point to?



2. You've moved your website and updated the A record. On your laptop you see the new site, but on your phone via 5G you see the old one. What's the most likely cause?



3. Which value is valid for an A record?



4. Why does this course use addresses such as 192.0.2.10 and 2001:db8::10?



Exercise

Exercise Z3.1: Look up A and AAAA. Look up the IPv4 address (A) and the IPv6 address (AAAA) of wikipedia.org. Fill in both addresses. If wikipedia.org has more than one, a single one is enough.

Exercise Z3.1: Looking up A and AAAA



We don't store what you enter or what we find live. Your browser remembers your answers and whether you've passed the exercise. If you're signed in, we only save that you got the exercise (almost) right in My courses; you can also delete that there.

Exercise O3.1: Set it up yourself in your practice zone. In your practice zone, create two records for the name web:

  • an A record with the value 192.0.2.10
  • an AAAA record with the value 2001:db8::10

Then click Check.

Exercise O3.1

You'll do this exercise in your own practice zone: a real DNS zone on WebOké's nameservers, just for you. Sign up with your email address. You'll get a login link by email and then come back to this lesson. We only use your address for the course.

Further reading

These articles describe the steps in WebOké's panels; in other panels, the process works similarly.

One moment…

Set up your domains

For each domain, arrange the nameservers, the link to your hosting and who becomes the owner.

Loading your domains…