DNS Lookups
DNS Record Types
There are several different types of DNS records. The most common ones are:
Type | Description |
---|---|
SOA | This is the Start Of Authority for the zone. This identifies this name server as authoritative for this zone. It also contains other information, including the TTL (Time To Live) and a serial number. |
A | This record resolves a name to a IPv4 IP address. |
AAAA | This record resolves a name to a IPv6 IP address. |
NS | This record specifies the Name Servers for a domain. |
MX | An MX record contains the name of the mail server for this domain. |
CNAME | This is a canonical name, which is an alias for another name. The name server should return the CNAME record and continue the DNS process for the name that it points to. |
PTR | This is a pointer to another name. Unlike CNAME the PTR record is returned with no further resolution. |
TXT | This is traditionally human readable information, but is frequently used for other things, like SPF (Sender Policy Framework) records. The SPF (Sender Policy Framework) is used by some mail servers to help identify spam emails. |
SPF | This is a newer alternative to storing SPF data in a TXT record. |
DNS Resolution
How does www.yourdomain.com get resolved to an IP address...
DNS lookups start with your DNS client contacting the root DNS servers of the internet.
The DNS client will pick one of the root DNS servers and ask it to resolve the name. The root DNS server would look at the last part of the domain name (.com) and return a list of DNS servers responsible for the .com zone.
The DNS client will then pick one of these DNS servers and ask it to resolve the domain name. The DNS server will then return a list of DNS servers responsible for the .yourdomain.com zone. These will be yourdomain's own name servers.
The DNS client will then pick one of these and ask it to resolve the domain name. This DNS server should actually know the A record for www.yourdomain.com and return it to the DNS client.
DNS Server | DNS Zone | Traversal Description |
---|---|---|
Root servers | All | Returns a list of name servers that are authoritative for .com |
GTLD servers | .com | Returns a list of name servers that are authoritative for .yourdomain.com |
Yourdomain's servers | .yourdomain.com | Returns the A record for www.yourdomain.com |
Each DNS record has a TTL (Time To Live) value. This value dictates how long this record is valid for. If another request is initiated, and the TTL has not expired, The first DNS server will return the same value without traversing all the way from the root servers down. This minimizes the number of requests DNS servers need to handle.