What is DNS and how does it work?

Like a phone book, a domain name system (DNS) bridges between humans and computers by linking them with their respective Internet Protocol (IP) addresses.

In this detailed guide, you will learn more about what DNS is, which servers are involved when a website loads, the definition of domain nameservers, and how to change them.

Every domain name has a DNS zone that links it to DNS servers, so we’ll also cover how you can change your DNS zone. Finally, we will review what is DNS propagation and the DNSSEC.

How does DNS work?

When users enter a domain name in their web browser’s address bar, they are taken to the site they want to visit. However, this seemingly instantaneous task consists of several steps known as or of DNS resolution process.

To better illustrate how DNS works, here is an example of the resolution process.

You want to go to the website, so you enter the domain name in the address bar of the web browser. What you’re doing here is sending a dns request.

Your computer will then check to see if it has already stored a dns record of the domain that you have sent locally. A DNS record is an IP address that corresponds to the domain name.

First of all, your computer will search its hosts file and its cache. The hosts file is a plain text file that maps hostnames to IP addresses in an operating system, while the cache is the temporary data stored by a hardware or software component.

The corresponding IP addresses of the DNS service are usually found in or in the cache of the Internet Service Provider (ISP).

However, if no matching IP addresses are found in the hosts file and cache, additional steps will be added to the resolution process.

Which DNS servers are involved in loading a website?

If your computer can’t find a matching IP address in your hosts file or cache, it will send your DNS query to a network of four DNS servers. The next section will cover each DNS server and how they work.

recursive resolver

The recursive resolver It acts as the main intermediary between a computer and other DNS servers. Its purpose is to forward a request to other DNS servers and then return it after completion.

When the recursive resolver receives a request, it first looks in its cache for an IP address that matches the domain name. If that IP address is found, the request sent to the DNS servers ends here, and you will immediately see the site you want to visit.

However, if it doesn’t find a match in its cache, the recursive resolver will send the request to the next DNS server: the root nameserver.

See also  now accepts cryptocurrencies

DNS root server

The root server either DNS root server it sits at the top of the DNS hierarchy. Take it as a reference map.

It does not save the information you are looking for, which is the IP address that corresponds to the domain name, but it gives indications of where it can be found.

Once the root server receives a request from the recursive resolver, it will identify the domain name resolver. So, it will tell the recursive resolver to go to the nameserver of the correct TLD.

Top Level Domain Name Server

The TLD name server is a DNS server responsible for storing and managing information about domain names that use a top level domain (TLD) specific. A TLD is the last part of a domain name, like .com, .org Y .

If your request is to find the IP address of .comthe root server will redirect the recursive resolver to the TLD nameserver .com. The TLD nameserver will then inform the resolver of the location of the corresponding IP address on a specific authoritative nameserver.

authoritative name server

The authoritative name server either authoritative DNS server it is the final authority in the DNS resolution process. It stores all the information related to the domain name you want to visit, including its IP address. The recursive resolver will get the IP address and send it back to your computer, directing you to the site.

Finally, the domain name system resolver performs the DNS caching, storing IP addresses collected from authoritative nameservers as temporary data. In other words, DNS caching means that the next time you want to visit the same site, it only has to return the match of the previously obtained IP address.

What are domain nameservers?

The function of a domain name server is to store all the DNS records of a domain name. Every time someone submits a query about your domain name, the nameserver returns the information corresponding to your domain name, allowing them to find your website.

The address of a nameserver is similar to that of a domain name. Hosting providers often have two or more nameserver addresses. For example, here are ‘s nameservers:

ns1.dns-parking.com ns2.dns-parking.com

In practice, nameserver addresses are often used to point a domain name to a hosting account through DNS services.

If you have purchased a domain name from a hosting provider, this action is not necessary. But it should be done if the domain registrar is not the same as your hosting provider.

For example, if you host a website at but have purchased a domain at , you will need to change the nameservers for the domain to point to . Only then will the domain name be connected to the website.

See also  How to install phpMyAdmin on Ubuntu 18.04

How to change nameservers?

You can only where the domain is registered. For example, if you have purchased a domain name on , you can change the nameservers from the hPanel. If you bought it in , you can only change them in Google Domains.

Domain names purchased from use their default nameservers. There is no need to change nameservers if you buy a domain from .

In the following steps, we will show you how to change nameservers from your hosting account. We’ll use as an example, but the steps should be similar for most hosting providers.

  1. Enter the hPanel, navigate to domainsand select the domain name you want to edit.
  2. In domain informationtogether with your nameserversChoose Change.
  3. In the section Select Nameserverschoose Use nameservers either Change nameservers. This last option allows you to enter custom nameserver addresses. We recommend simply choosing the first option if you want to point your domain to .
  4. Guard the changes.

Once the nameservers are correctly pointing to your hosting account, you will be able to control the DNS zone from your hosting management panel. For example, if your Google Domains domain is pointing to , the DNS zone will now be controlled from .

What is a DNS zone and how to make changes to the domain?

A DNS zone it is a portion of the DNS namespace partitioned for administrative purposes by a person or an organization. Each zone contains at least one DNS record.

If you use the host’s nameservers for your domain name, you will be able to make changes to the DNS zone using the provided tools. There are different reasons to modify a DNS zone, one of them is to point the domain to another address.

It’s easy to modify DNS zone files or records with the DNS Zones Editor. If you use , you can find the editor simply by going to hPanel and going to Advanced -> DNS Zone Editor.

On the DNS Zone Editor page, you will see a form to add new DNS records. There are eight types of DNS records that you can add.

Below is a table of existing records. Use the search bar to find the exact DNS zone file you are looking for and then erase or modify an existing record by selecting Edit.

But before you make any changes to your DNS zone, it’s essential to understand the purpose of the main DNS records and the difference between them.

Record A

A record A or a DNS host record points a host or domain name to an IPv4 address. For example, convert .com in 104.19.184.120. A AAAA record works similarly, but transforms a host name into an IPv6 address.

See also  The 9 Best WordPress Newsletter Plugins

Each domain name can only have one A record. However, by default, you will find two A records in the hPanel, one for your domain (@) and one for him FTP. They both point to the same IP address.

Modifying your A records helps you point your domain name to a different IP address. To do this, simply click Edit and make the relevant changes in the required fields:

  • Guy – only change the type to AAAA if the new IP address is IPv6.
  • Name – the @ symbol refers to your root domain, for example, yourdomain.com. If you modify the A record of a subdomain, such as sub.yourdomain.comfill in this field with the subdomain instead.
  • Point to – fill this field with the new IP address.
  • TTL – it means “time-to-live” (time of life). The value entered here will tell the DNS resolver how long to cache a DNS request. The default value is usually 14400 either four hours.

CNAME record

A CNAME record or a registration of “canonical name” sets a particular domain as an alias for another domain. When users enter one of the alias domain names into their web browsers, they will be taken to the same IP address.

This helps domain administrators as they do not need to create multiple A records to point multiple domain names to the same IP address.

For example, you want your subdomains alias1.yourdomain.com Y alias2.yourdomain.com point to central.yourdomain.com. Adding a CNAME record for each alias domain will do the trick.

When you add a new CNAME record, apart from the TTL, enter the name of the domain or subdomain you want to target in the field Nameand in the field Point to Enter the domain that the domain or subdomain will point to.

MX record

A record MXcorresponding to mail exchange (email exchange), identifies a mail server used to process incoming email received by a particular domain name. For example, if an MX record was created for yourdomain.comyou will be able to receive emails through the email address @yourdomain.com.

has two MX records by default:

mx1..com mx2..com

If you want to use a third-party email client like Google , you have to change each default MX record to Google’s.

Here we explain how to complete the required fields when modifying or adding a new MX record, apart from the Name Y TTL:

  • Mail server – paste the address of the…
Loading Facebook Comments ...
Loading Disqus Comments ...