A and AAAA RecordsDomains & DNS

Both of these records map a host to an IP address. The "A" record is used to map a host to an IPv4 IP address, while "AAAA" records are used to map a host to an IPv6 address.

The general format of these records is this:

host     IN      A       IPv4_address
host     IN      AAAA    IPv6_address

So since our SOA record called out a primary master server at "ns1.domain.com", we would have to map this to an address to an IP address since "ns1.domain.com" is within the "domain.com" zone that this file is defining.

The record could look something like this:

ns1     IN  A       111.222.111.222

Notice that we don't have to give the full name. We can just give the host, without the FQDN and the DNS server will fill in the rest with the $ORIGIN value. However, we could just as easily use the entire FQDN if we feel like being semantic:

ns1.domain.com.     IN  A       111.222.111.222

In most cases, this is where you'll define your web server as "www":

www     IN  A       222.222.222.222

We should also tell where the base domain resolves to. We can do this like this:

domain.com.     IN  A       222.222.222.222

We could have used the "@" to refer to the base domain instead:

@       IN  A       222.222.222.222

We also have the option of resolving anything that under this domain that is not defined explicitly to this server too. We can do this with the "*" wild card:

*       IN  A       222.222.222.222

All of these work just as well with AAAA records for IPv6 addresses.