Skip to content

Basic DNS Records

This overview explains the most important DNS record types (A, AAAA, CNAME, ALIAS, TXT) and shows the syntax for BIND.


1. A Record (Address)

Maps a hostname to an IPv4 address.

server.example.com.  IN  A  192.168.1.50

2. AAAA Record (IPv6 Address)

Maps a hostname to an IPv6 address.

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

3. CNAME Record (Canonical Name)

Points one hostname to another hostname (alias). According to the RFC, it must not be used for the root domain (apex) - use ALIAS for that instead.

www.example.com.  IN  CNAME  server.example.com.

4. ALIAS Record (ANAME)

An ALIAS record behaves like a CNAME, but unlike a CNAME it may also be used on the root domain (apex). The name server resolves the target internally and returns an A or AAAA record directly to the client.

example.com.  IN  ALIAS  example2.com

5. TXT Record (Text)

Stores arbitrary text. Today it is primarily used for domain verification and email security (SPF, DKIM, DMARC). It is also used for certificates with DNS validation.

example.com.  IN  TXT  "some-verification=1234"