What is DNS and what is it used for?

What is DNS and what is it used for? 1

What Is DNS

DNS is a domain name recognition system for obtaining information about domain names. The domain name system is mainly used to find out the IP address of a domain name, mail routing, as well as information recognition regarding data in DNS resource records.

Based on the work of the DNS server, the work of almost the entire Internet is built. The domain name system is set up to simplify the writing and memorization of devices. That is, instead of a hard-to-remember IP, a domain name is assigned to it.

Previously, the HOSTS file was responsible for this, all Internet hosts were registered there. Since the expansion of the Internet, this is not enough, and it was intended to prescribe DNS records, create a domain name system.

Very important!

It is worth taking care that the DNS is properly configured, because in turn this will adversely affect the performance of the site, and for a long period of time. Changing the DNS is not done immediately, it usually takes 72 hours, so then when you make changes, add a new one, or register a new DNS server, you should be very careful and responsible.

Special! If your site has a certain stream of customers who leave their data, because they, like you, are first and foremost important for the site to work correctly and quickly!

Here is the work of the DNS server

How DNS Works

Hostry DNS

You can configure the DNS server yourself. Hostry offers its own DNS server and settings for it.

You can find the DNS and set the appropriate values ​​for each record. If you do not have domain name services, we offer you to take advantage of this opportunity for free by clicking on the link:


What is DNS and what is it used for? 2

DNS Records

What is DNS and what is it used for? 3

DNS records have in themselves certain values ​​that you need to register. Each DNS record is unique and special, so then when you register them, make sure that you do everything correctly so that later certain errors cannot occur! DNS resource records are records that correspond to the name and service information in the domain name system (for example, the match of the hosting provider and the domain name, the correspondence of the IP address and the domain name, etc.)

Next, we consider what types of resource records DNS are, what they mean and what values ​​need to be entered there

А – Record

What is DNS and what is it used for? 4

A record is a DNS address record that is a pointer or a guide for the correspondence between an IP address (IPv4) and a domain name. This entry is one of the most frequently used and popular domain names in the system. On a virtual server, you can register several A records at a time if there are several servers that fulfill the request and process information for only one domain name.

IMPORTANT! While A record is not registered, the site will not work.

What is DNS and what is it used for? 5

AAAA – Record

What is DNS and what is it used for? 6

AAAA records assign the IP address to the domain name as well, but not IPv4 but IPv6! Each host can also have several such AAAA records.

What is DNS and what is it used for? 7

CNAME – Record

What is DNS and what is it used for? 8

Today one-level domain forwarding is very widely used in the domain name system!

This record allows one host name to assign another, that is, it gives a certain “alias” to the domain name. This canonical domain name is used to redirect or redirect the domain. For example, when making a request to www.hostry.com, the site hostry.com is opened, you need to create an entry www.hostry.comCNAME for the domain hostry.com.

What is DNS and what is it used for? 9

MX – Record

What is DNS and what is it used for? 10

MX records in the domain name system are provided and are responsible for the server through which mail will work. MX records are VERY important for mail operation, because it is thanks to them that the sender understands and knows which server to send mail for the domain to.

This record should consist of two parts: the first part is the priority (the larger the number, the lower the priority), and the node address. If, for example, mail is served by several servers at once, then the mail will be sent to that server, whose priority is correspondingly lower. If this server is unavailable for some reason, a request is sent to the next one, but with a low priority.

What is DNS and what is it used for? 11

TXT – Record

What is DNS and what is it used for? 12

This type of record keeps all the textual information about the domain name. TXT records are used for various purposes:

  • Email Security;
  • Proof of use and ownership of the domain name;
  • Confirmation of the site security certificate;
  • Verify Domain Information

Also in the TXT records can be used to specify the STP-domain records

NS – Record

What is DNS and what is it used for? 13

The function of NS records in the domain name system is pointing to the DNS server that serves this domain. This type is very important for the domain name system to function.

This type of record is responsible for storing the remaining resource records. The total number of NS records must necessarily strictlycorrespondto the number of servers serving it.

What is DNS and what is it used for? 14

How to configure the DNS server

What is DNS and what is it used for? 15

Debian DNS Setup

First, you need to install bind9

apt-get install bind9

Then, Edit the /etc/bind/named.conf file to add a description of your zone (For Example,domain hostry.com)

zone "hostry.com" {
        type master;
        file "/etc/bind/hostry.com";

It is necessary to edit the file /etc/bind/hostry.com while adding the lines:

 $TTL    3600
 @  IN      SOA     ns1.hostry.com. root.hostry.com . (2012000001 10800 3600 604800 86400) 

 @  IN      NS      ns1 
 @  IN      NS      ns2 

 ns1     IN      A 
 ns2     IN      A  
@       IN      A
www     IN      A

After re-read the DNS server configuration

rndc reload

Ubuntu DNS Setup

Since the bind9 package is already installed, you need to start it:

/etc/init.d/bind9 start
 update-rc.d bind9 start 15 2 3 4 5 .  stop 70 0 1 6 

Further configuration is performed in the same way as in Debian

CentOS DNS Setup

Since the centos DNS template is already pre-installed in the centos software template, it should be further configured and run.

To do this, you need to edit the file /etc/named.conf, you should delete and replace with the characters of the line

listen-on port 53 {; };
allow-query     { localhost; };

Next, you need to install rndc.key. You can create (/etc/rndc.key)using the command

rndc-confgen -a

Then, add the following values ​​to /etc/named.conf:

key "rndc-key" {
      algorithm hmac-md5;
      secret "sUUony71pdPDHSZjNrkDFQ==";

 controls {        inet port 953        allow {; } keys { "rndc-key"; }; }; 

**secret "sUUony71pdPDHSZjNrkDFQ==";

**This value needs to be taken from the /etc/rndc.key file.

After you need to run named and add it to auto run

/etc/init.d/named start
chkconfig named --level 2345 on


Hostry recommends registering a domain name


Then, register the DNS records that are necessary for its proper operation


Thank you for choosing our service!