DNS Record Types

A record and AAAA record

  • Indicates the IP address of a given domain.

  • A records hold IPv4 addresses.

  • AAAA record hold IPv6 addresses.

CNAME record

  • The ‘canonical name’ (CNAME) record.

  • Forwards one domain to another domain, it cannot be an IP address.

  • Only work for non-root domains, e.g. somethinghastogohere.mydomain.com.

    • You can't have CNAME records without there being something where somethinghastogohereis.

Alias

  • Free of charge.

  • Native health checks.

  • You create alias records to route traffic to selected AWS resources, e.g. map your record name (example.com) to the DNS name for an AWS resource(elb1234.elb.amazonaws.com).

  • Works for root domains and non-root domains.

  • Alias record typically have a type of A or AAAA, but they work like a CNAME record.

NS record

  • Stands for ‘nameserver,’ and the nameserver record indicates which DNS server is authoritative for that domain.

  • NS records tell the Internet where to go to find out a domain's IP address.

TTL record

  • Time To Live (TTL) is kind of like an expiration date that is put on a DNS record.

  • Used to tell the recursive server or local resolver how long it should keep said record in its cache.

  • The longer the TTL = the longer the resolver holds that information in its cache; less traffic on DNS servers.

  • The shorter the TTL, the shorter amount of time the resolver holds that information in its cache; more traffic on DNS servers.

  • For example example.com has an A-record at the apex of the zone to point us to a server.

    • With a TTL of 3600 seconds (1 hour), that means that as a recursive server learns about example.com, it will store that information about the A-record at example.com for one hour.

      • Anyone else who uses that same resolver will get the same answer, and on the authoritative side, there will be no query to the server unless the TTL runs out.

  • Lower TTL = Better for users with caching and when changing things related to DNS.

Last updated