DNS record types

A and AAAA records

Map a hostname directly to an IPv4 or IPv6 address and know when both record types should exist.

8 minute lesson

~~~

An A record maps a name to an IPv4 address. An AAAA record maps a name to an IPv6 address.

For example:

www.example.com.  300  IN  A     192.0.2.40
www.example.com.  300  IN  AAAA  2001:db8::40

The owner name is www.example.com, 300 is the TTL, and the values are addresses. A record cannot contain https://, a port, or a URL path. DNS gets the client to a host; the application protocol handles the rest.

A name can have several A or AAAA records. DNS can return all of them, but that alone is not a health check. Unless another service monitors and removes failed addresses, clients may still receive an unreachable destination.

Modern clients can request both record types and choose a working route based on their network. Publish an AAAA record only when the service, firewall, TLS configuration, and return path really work over IPv6. A broken IPv6 path can make a healthy IPv4 website appear unreliable.

Check the two families separately:

dig A www.example.com +short
dig AAAA www.example.com +short
curl -4 https://www.example.com/
curl -6 https://www.example.com/

The curl checks test more than DNS: they also require routing, a listening service, and valid HTTPS. This separation helps explain why a correct DNS answer does not guarantee a working page.

Your action is to query both address types for a hostname you use. If both exist, test both connection families and record whether the DNS and HTTP evidence agree.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →