FAQ / Glossary

DNS / DNS records

‹ Glossary

DNS stands for Domain Name System. It is a hierarchical, or if you like tree-like, structure in which domain names are organized by levels.

You should already know what a domain is from the article Domain.

DNS creates word equivalents of IP addresses. Every computer or server has its own unique address. For example, our server has the IP address 192.168.1.1. This number would be hard to remember, so the server is assigned a DNS record that adds the domain named seznam.cz to the number 192.168.1.1.

DNS thus makes it possible to translate IP addresses into domains and also domains back into IP addresses. Among other things, it can build the tree-like structure of domain names mentioned above, which means that, for example, the address 192.168.1.2 can denote the subdomain subdomena.seznam.cz, which would not be apparent from the number alone.

DNS can work with various types of records, the most common of which are described below

A record - a record that is given in a human-readable form. The DNS protocol, however, passes records in numeric form, e.g. 192.168.1.1. This is an IPv4 address.

AAAA record - the same as the A record, except that it holds IPv6 addresses.

MX record - a record containing the domain name of the mail server to which mail for the given domain will be delivered. There can be several MX records in DNS, even for a single domain. If there are several, delivery follows the configured priority. If mail cannot be delivered to the first server, the second one is used, and so on.

If we want, for example, to send an email message to jan.novak@mujweb.cz, we ask for the MX records of the domain “mujweb.cz” and learn the following:

mujweb.cz. 28800 IN MX 20 smtp1.mujweb.cz.
mujweb.cz. 28800 IN MX 20 smtp2.mujweb.cz.
mujweb.cz. 28800 IN MX 20 smtp1.doma.mujweb.cz.

Here we can see a situation where 2 servers have the same priority, which means it does not matter which of them we try to deliver the message to. If neither of them answers, we try to deliver the message to the third server. Of course, before any communication with them, we must first resolve the names of the mail servers to IP addresses.

CNAME record - a kind of substitution of several other servers by one stand-in, according to the A record. It is best shown with an example.

www1.domena.cz. 1800 IN CNAME domena.cz.
www2.domena.cz. 1800 IN CNAME domena.cz.
www3.domena.cz. 1800 IN CNAME domena.cz.
domena.cz. 1800 IN A 192.168.1.1
domena.cz. 1800 IN MX mail.domena.cz.

The table clearly shows that the address of domena.cz is 192.168.1.1, i.e. the A record. We have also created three more subdomains, which are directly tied to domena.cz and use its IP address. So if the server's address changes, for example when network equipment is replaced, you only need to change the address in the A record and not all the other addresses.

NS record - these records hold the so-called authoritative DNS records for the domain. If you want to connect your computer to a network, for example a school network, it first looks up the top-level DNS records and then the lower-level records, down to the one you want to connect to.

A list of NS records may look like this, for example

cuni.cz. 18000 IN NS ns.ces.net.
cuni.cz. 18000 IN NS golias.ruk.cuni.cz.

With the NS record we can find out that the domain does not store its zone file in the second-level domain, but on another server. Here it is ns.ces.net.

SOA record - a record that appears in the zone file mentioned above, exactly once. It is a kind of header that contains the following information.

MNAME - the name of the primary DNS server for the given zone
RNAME - the contact for the zone file administrator; it is given as an email address in which the at sign is replaced by a dot (because the at sign has a special meaning in DNS)
SERIAL - the zone's serial number; a numeric value that indicates the version of the zone file; when records change, the number is increased, and secondary DNS servers, by comparing it with the number they have stored, find out that a change has occurred and that the data needs to be updated
REFRESH - the number of seconds after which, since the last check or loading of the zone from the primary DNS, the secondary server checks the serial number
RETRY - after starting to check the serial number as described in the previous item, the request to the primary DNS server is repeated after RETRY seconds if the previous request failed (if the server did not respond)
EXPIRE - if the serial number cannot be fetched from the primary DNS and EXPIRE seconds have passed since the last successful attempt, the zone is considered invalid and the secondary DNS server should drop it from its records (forget it)
MINIMUM - a field that has historically had many different meanings:

  • the minimum TTL value for all records in the zone (the original meaning)
  • the default TTL for records for which this value is not specified (the second meaning)
  • the TTL for negative caching, i.e. the time for which caching DNS servers remember that a record does not exist (the current meaning)

Still not sure what to do?

Write to us and we will solve it together.

Contact support ›