The “Domain Name System” (short DNS) is kind of a telephone book for the internet.
Basically the communication between 2 computers happens over IP addresses. Due the the fact, that these (and especially IPv6) addresses are not easily memorable for humans so called “domain names” can be connected to these IP addresses.
Therefore a DNS-Server “translates” a request like “google.com” into the IP address 184.108.40.206 (v4) and 2a00:1450:400d:802::200e (v6).
The 8 steps of a DNS lookup:
- A user enters the address “example.com” in a web browsers. This creates a request to the next available “DNS recursive resolver”.
- This “resolver” creates an additional request to the next available “DNS Root Server” (.)
- The “Root Server” redirects this request to next available “Top Level Domain (TLD) DNS Server” (like z.B. “.at” or “.net”). Due to the fact, that our request contains the domain “example.com” the DNS resolver gets the address of the next available “.com” TLD DNS Servers.
- The “resolver” now sends the request to the newly available “.com” TLD DNS Server.
- The TLD DNS Server returns (if available) the IP address of the Domain Name Server for “example.com”.
- Finally the “resolver” sends a request to the specific Domain Name Server.
- Finally the IP address for “example.com” will be returned to the “resolver”.
- The “resolver” sends this now resolved IP address for the requested domain back to the client.
DNS records are instructions how a DNS server handles specific DNS requests for a specific Domain.
These instructions are basically pure text files written in a specific DNS syntax.
Also every DNS record has a “Time-to-live” (TTL), which defines how often a DNS server refreshes its configuration.
Most important DNS record types
- A and AAAA
- Contains the IP address (A = v4, AAAA = v6)
- “Canonical Name” refers to another domain (not IP address!)
- “Mail Exchange” refers to a mail server
- Allows an Domain-Admin to enter pure text entries
- Mostly these are used for SPF entries or to verify a domain
- “Start of authority” show important Admin information about the domain owner an (e.g. an E-Mail address)
- “Service” refers to a special host and port for a specific service like VOIP
- “Pointer” is the opposite of an “A”-Record and is used for the “Reverse-Lookup” get the connected domain out of an IP address.
There are many more DNS record types, but mostly they aren’t used that often. See more HERE.