How does DNS work?
Dear DNS Experts,
The target audience for this tutorial is intermediate users who want help understanding how DNS works. Specific technical and engineering details may be omitted or simplified for the purpose of keeping a complex topic as simple as possible.
What is DNS?
In a nutshell, the Domain Name System (referred to as DNS) translates human readable domain names into IP addresses. DNS, domain name server, domain name system, and name server all refer to the same general service.
To a human being, www.hover.com is immediately recognizable as a website address. To a computer, www.hover.com has absolutely no meaning until it contacts a name server. Your Internet Service Provider's name server will translate www.hover.com to 220.127.116.11 for your computer. Using 18.104.22.168, a computer can locate our web server and load the Hover website. Go ahead and load http://22.214.171.124 using your web browser's address bar and you'll see the Hover website!
Most of the time, your computer will contact your Internet Service Provider's DNS server and receive the IP address for the website you want to load.
If your Internet Provider's DNS server does not have the IP address for the website, or if its records are too old, then it has to update its records before it can give your computer an IP address. I'll highlight the process in the next steps.
First, your Internet Provider has to contact one of 13 root name servers to find out the IP address of a name server for the top level domain. Top level domains are .COM/.NET/.BIZ/.CA/etc.
Next, your Internet Provider will contact the top level domain name server (.COM in the example above) and ask it for the authoritative name server's IP address.
The authoritative name server for a domain name is chosen by the domain owner. In your Hover account, for example, the name servers that you have entered for your domain name under the Account tab are the authoritative name servers. They are the primary source for your domain records.
Now that your Internet provider has found the authoritative name server, it is able to get the IP address for the domain. The Internet Provider's DNS server will update its local cache so it knows the IP address the next time it receives a query.
The website IP address is returned to your computer and this enables you to load the website in your browser.
Common DNS Terminology - Impress Your Friends with Acronyms!
A record: Maps hostnames to the IP address of the host. For example, the A record for hover.com points the domain hover.com at 126.96.36.199.
Authoritative Name Server: Any of the name servers that a domain name has been pointed at by the domain registrar. In Hover, you can set your domain's authoritative name servers by selecting the Account tab and clicking on Name Servers.
CNAME (Canonical Name) record: This record points one name to another. CNAME are sometimes referred to as an alias. For example, mail.hover.com is a CNAME pointed at mail.hover.com.cust.hostedemail.com.
DNS: DNS is an acronym for Domain Name System or Domain Name Server. The Domain Name System assigns domain names to IP addresses. It allows humans to use simple domain names to load websites instead of having to remember cryptic IP addresses.
DNS caching: DNS caching is the length of a time that a DNS server will retain existing DNS records before checking for updates. The length of time that records are cached is usually determined by the TTL (see definition below) set by the authoritative name server, but some Internet Service Providers may have their DNS servers set to cache records for a longer period of time. This delay in updating DNS cache is commonly called DNS propagation.
DNS propagation: Depending on who you ask, you may receive different definitions for DNS propagation. This term is generally used to describe the time taken for the cache of TLD name servers to be updated after changes are made to a domain name's authoritative name servers. For example, after changing your domain's name servers in Hover, the TLD name server may still direct queries to the old authoritative name servers until it's cache has expired. DNS propagation is also used sometimes to describe the time taken for Internet Service Providers to update their own local DNS caches, since some Internet Service Providers do not always update their local cache based on the TTL of authoritative name servers.
IP Address: Internet Protocol (IP) address. This is a numerical address assigned to computers and servers on the Internet. It's like a civic address for a computer. Computers need to have an IP address in order to find and communicate with each other over the Internet.
Hostname: A name or label that has been assigned to a host computer. Hover.com by itself is just a domain name, but after hover.com has been pointed at an IP address (the host) by a DNS server, it becomes a hostname.
Hosts file: The hosts file is a text file in your computer's operating system that you can use to override external DNS records. It is similar to a zone file, but it is local to your computer system. You can edit your hosts file to force your computer to use a specific IP address for a domain name. Editing your hosts file should be done with extreme caution. If you change your hosts file to point www.hover.com at 188.8.131.52, for example, then your computer will ALWAYS use 184.108.40.206 for www.hover.com. This will prevent you from being able to load a website if the server IP address changes in the future, until you remove or edit the entry in the hosts file.
MX (Mail Exchange) record: A MX record specifies where email should be delivered. Hover's MX record is mx.hover.com.cust.hostedemail.com. An MX record also contains a numeric priority. The lower the priority number, the higher the priority (yes, it sounds a little backwards). Some mail systems have different MX records for different inbound servers. If the first server is busy, the email gets routed to the next available server.
Name servers (aka DNS servers): Name servers, or DNS servers, are the computer systems that use the Domain Name System to translate hostnames into IP addresses that can be used by computers to communicate with each other over a network or the Internet. The fully qualified domain name, www.hover.com, is not recognizable to a computer system until it queries the name server and finds out that the IP address for www.hover.com is 220.127.116.11. Computers locate each other using numbers, while human beings are better at processing and understanding language. Domain names registered in Hover are pointed at our name servers by default, ns1.hover.com and ns2.hover.com.
TTL (Time to Live): The TTL is a time, in seconds, set by an authoritative name server which tells non-authoritative servers how long to cache records. The Hover DNS server has a minimum TTL of 900 seconds. This means that other DNS servers are instructed not to query our name server more frequently than every 900 seconds (15 minutes) for new DNS updates.
Zone File: The zone file is a text file that contains a set of DNS records for the domain name. Each domain name that is registered in Hover is pointed at ns1.hover.com and ns2.hover.com. These are the Hover name servers. These name servers contain a zone file for every domain name registered in Hover. You can edit your zone file using the Manage DNS section under the Account tab when logged into your Hover account.
Still need some help? Submit a Request.