What is DNS and How Does it Work?


DNS is a decentralized, hierarchical naming system used to identify computers on the Internet and other Internet Protocol networks. DNS works by storing resource records that link domain names with other types of information. These records are stored in the root zone of a domain name’s server. There are many different types of resource records.

NS record

An NS record is a key piece of information about your domain name. It identifies the name server responsible for managing requests to your domain name. The purpose of the NS record is to help other domain controllers find your domain and send zone transfers to it. You must configure your NS records appropriately to improve your website performance.

Your domain can have up to three NS records. Using multiple NS records can increase the redundancy of your DNS service. You can host each NS record on a separate network segment. This is important since DNS services can be affected by network failure. You should also ensure that all NS records are correctly configured.

NS records are used to direct requests to the authoritative name server. They are important because incorrectly configured NS records can cause domain services to fail. For example, if you don’t specify the NS record for your domain, your resolver will send requests to another name server. This is called DNS caching.

CNAME record

A CNAME record is a resource record in the Domain Name System (DNS). It maps a domain name to another domain name. Its purpose is to ensure that a website is always reachable on the internet. A CNAME record is also known as a Canonical Name record.

To set up a CNAME record, go to the DNS settings of your hosting account. You can find this information in your hosting provider’s control panel. Click the “create” button to add a CNAME record. Type in the subdomain of the main domain and click “create.”

CNAME records can be created and deleted at any time. You can also use an online tool to check CNAME records. The online tool allows you to type in the CNAME record you need and select a server.

Authoritative name server

Authoritative name servers (ANS) are the servers that resolve a domain. When a user enters a domain, these servers return the IP address of that domain if they have it. Otherwise, they throw an error message. This is the first step in a DNS lookup.

The authoritative name server must be in the same domain as the requested domain and serve consistent data. In addition, it must have the same NS and SOA records as the designated domain. Moreover, it must be in a globally routable network. The server must also match the authoritative A and AAAA records from the domain’s parent zone.

There are two main types of name servers on the Internet: authoritative and recursive. The first type of name server stores domain records. It usually belongs to the domain registrar or DNS hosting provider. On the other hand, Recursive name servers act as middlemen between the authoritative name servers and end-users. Internet Service Providers often manage these servers (ISPs). The recursive name servers store caches of DNS record information.

Flag field

The Flag field in DNS is a 16-bit field used for signalling purposes in the DNS protocol. Specifically, it contains information about the query type and response sent. It is encoded in the DNS header and the EDNS flags field. The flag value can be a space-separated list of flag text values.

Flags can also include the following values: TC stands for truncated; RD stands for recursion desired, and RA stands for recursive request. A DNS server can set the RD bit in the request and the response if it wishes to recurse. A client can also set the RD bit if the response is longer than 512 bytes.

Another field in the DNS header is called the Query/Reply Flag. It identifies a query as authoritative if it is a recursion-desired request. If the DNS server is authoritative for the queried name, it will set this flag to a value of one.