What Is DNS & How Does It Work?


Domain Name System is one of the toughest parts when it comes to learning website configuration. By understanding what is DNS, you will be able to find out the problems that are associated with configuration of your website. In addition, this knowledge will help you in widening your mind regarding what happens behind the curtains. This is a brief guide that will familiarize you with what is DNS and how does it work.

What is DNS?

what is dnsDomain Name Systems offer an easy access to visitors to the websites with the help of domain names instead of using IP addresses. There is only a single purpose of DNS. It converts names in the form of numbers. Numbers means the IP addresses which work like numbers in the home addresses of your websites. The email that is provided to your home is delivered through a mail carrier who knows your location.

Besides, DNS works just like a carrier of mails. It functions by taking the domain names and then converting them into distinct addresses. These addresses help you in sending the messages all across the web. In other words, DNS converts the names of websites like Google.com in to their IP addresses of such servers that host this specific site.

How does DNS work?

DNS works by translating the domain names in to a language that is spoken by computers i.e. IP addresses. The domain names are created on the basis of texts that are used for the identification of web location or a website. On the other hand, IP addresses the those numbers that are utilized by all the computers that are connected to the web for the identification of a location of a website and communicating with all the other computers and servers on the web.

How DNS WorksThe location identifier or a website based on text is translated by DNS for helping you in finding out the particular location that you are trying to search on the web. For instance, if you are searching for coolexample.com and the IP address that is associated with it is The Domain Name System is going to translate the domain name of this website to its IP address.

With the help of DNS, you can easily type such domain names that can be easily remembered and can also be easily read by the machines.

The information of DNS is stored in the zone file of every domain name. There are massive collections of these files of zone for variant domain names that are found on the servers of name. These nameservers are pointed out by the domain names for locating the zone files.

Here’s a brief explanation of what DNS do and how it is done:
1. First of all, you buy a domain by registering at different host servers.
2. The registrar spreads the information of your name server in the world and he lets the people know that you have selected a particular domain name.
3. The DNS of your domain is housed by the nameservers. If anyone wants to get connected to your domain, the domain name is turned by the name server in to an IP address. The results are then sent to your computer.
4. You will receive the IP address answer on your computer from the name server. This will open up a new connection to the server of the web at that specific address for requesting the page of the web.
5. The request is responded and fulfilled by the web server.  The web pages transmitted to your computer.
How Does DNS Work
6. Name server is then requested by your computer from the domain registrar.
7. The domain name is then turned by the name server into an IP address and this address is then sent to your computer.
8. Your PC then gets connected to the IP and then submits the request of the page of domain which is again sent back to your PC.

Introduction of DNS Records

With DNS (Domain Name System), webmasters can easily locate computers by use of friendly and hierarchical names among other resources presented on IP network. A DNS will define database querying and updating mechanism, database schema and database information replication mechanism. Servers will consult DNS database files (zones) to resolve names. In the zones, servers will find resource records (RRs) which contain DNS domain associated information.

Besides, the resource records may either map friendly names to given IP addresses or map IP addresses to given friendly names. Read the introduction to DNS records below to know more.

Resource Records Types

DNS Records TypesBefore proceeding to the introduction to DNS records types, it is important to note the resource records format. Resource records will have syntax consisting of Owner (Host name or DNS Domain), TTL (Time To Live), Class (protocol family used), Type (Resource record type) and finally RDATA (Resource Record Data). Every zone will have SOA (Start of Authority) resource records.

To show the functions and structure of common DNS records, we will look at the DNS record file sample below. Some of the records are generated automatically while some have to be created. Automatically generated records do not present the user with mechanisms to create records. Below is a sample domain file:
DNS Records 1

SOA Records

SOA (Start Of Authority) record contains a number of items including the machine name in which the file was created, the name of the individual who created the file in form of “dotted email address”. The information is for purposes of documentation and do not therefore affect the working of the DNS. Then there is the “serial” which is gets incremented in the event of a change to the file.

NS Records

The NS (Name Servers) records states the domain’s name servers. They will include both the primary and the secondary servers for the specific zone in SOA and will also have servers for other delegated zones. The NS records are found in every zone at the zone root. For instance, when subdomain noam.bisend.com is delegated to noamdc1.noam.bisend.com by the administrator of bisend.com, the following line will be added to the two zones noam.bisend.com and bisend.com.
noam.bisend.com. IN NS noamdc1.noam.bisend.com.

A Records

The A (Address) records map FQDN to a given IP address eliciting the resolvers to request a corresponding IP address for the FQDN. Simply put, the A records specify IP address for a host. It will specify the localhost loopback address The loopback is followed by a machine name (mail.mydomain.com) which is at IP address

MX Records

The MX (Mail Exchanger) record has a null name. It relates to mails sent to mydomain.com for instance [email protected] Right after the MX record, there is a number which signifies the priority of the record. The higher the number, the lower the priority, which means that the lower number is tried first in the event that there are two or more records that can apply to a name.

However, there is only one mail server in small networks. Note on our file above, there is an MX record for host “www” which sends mail to [email protected] to a specific machine webmail.mydomain2.com. In the examples above, the machines are specified by name but could also be specified by their numbers.

CNAME Records

This is the file in the middle of our sample file above. CNAME record defines an alias and means “Caconical Name”. In the sample file above, CNAME defines “impmail” which is within mydomain.com and directs it to a host “imap” which is in the domain mydomain2.com. In this case, the target machine could be anywhere.

TXT Records

TXT or Text Record links general written information with a given item in the DNS database. It is mostly used to identify the location of the host. One TXT record may be made of strings of records which may add up to 64 KB. TXT records are among the lesser known records. This record may be used to implement Sender Policy Framework details.

AAAA Records

This is a special Address that maps a computer or any other network device (host) name to 128-bit IPv6 address. Note that regular DNS records is usually defined for a 32-bit address and IPv4. This elicited the need for the creation of a resource record that allows a domain name to be linked with 128-bit IPv6. The AAAA record works the same as A records and the mnemonic AAAA indicates that IPv6 is higher than IPv4 four times.

Summary of Records Functions

This introduction to DNS records has briefly looked at the following functions for the various DNS records. To define a domain, you should use SOA record with a number of NS records. In addition, A Record is used to define a host (name or machine), MX record used to send mail somewhere and CNAME resource record is used to define an alias.