What is DNS?
The Domain Name System (DNS) is the phonebook of the Internet. Humans access information online through domain names, like cloudflare.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources.
Each device connected to the Internet has a unique IP address which other machines use to find the device. DNS servers eliminate the need for humans to memorize IP addresses.
How does DNS work?
The process of DNS resolution involves converting a hostname (such as www.example.com) into a computer-friendly IP address. When a user wants to load a webpage, a translation must occur between what a user types into their web browser and the machine-friendly address necessary to locate the webpage.
The 4 DNS servers involved in loading a webpage
- DNS recursor — Designed to receive queries from client machines. It can be thought of as a librarian asked to find a particular book.
- Root nameserver — The first step in translating host names into IP addresses. Like an index pointing to different racks of books.
- TLD nameserver — Hosts the last portion of a hostname (e.g., .com, .net). Like a specific rack of books in a library.
- Authoritative nameserver — The last stop in the query. Contains the actual DNS records for the domain.