- label Expert advice
- favorite 0 likes
- remove_red_eye 159 views
- comment 0 comments
2 min read
The main task of the DNS (Domain Name System) is to translate human-understandable domain names into numerical data used by computers. When someone types a website address into a search engine, the DNS server looks up the IP address of that website. In other words, it is a database, used on a global scale, which contains the IPs assigned to the relevant websites.
Types of DNS queries
When it comes to the types of DNS queries, we can distinguish two:
Recursive - the query is quite specific, i.e. it forces the server to either find information about the page or send an error message. The server, when it fails to respond, will forward the query to another DNS server.
Iterative - is not as concrete as recursive. In this case, when the server does not find an IP address in the database, it is not forced to pass the query to another server. Its task then is to give the best answer it has at the time. It refers to the addresses of the domain's authoritative servers.
How does the DNS server work?
In order to illustrate the operation of the DNS server, it is best to list the path of its activities in bullet points:
- The user enters the domain name into the search engine, e.g. https://www.megamo.pl/
- A request is sent to translate the page into an IP address to the local DNS server via the system, using a browser.
- The request is then forwarded to one of the main servers (roor-servers).
- The master server responds by relaying the location of the server's IP address, which has web pages with the appropriate suffix, in our case this would be .pl.
- The DNS server then passes the information to the user's computer, more specifically the number assigned to the domain being searched. The computer connects to the IP address, in effect displaying the content of the page.
Each of these activities takes place at a very fast pace, so we as ordinary users do not notice the DNS server's operation.
Why do some pages load faster and some slower? - DNS server response
The loading of pages largely depends on how quickly the DNS server finds the IP address of a domain. The time taken to find an IP address is influenced by many factors, such as the distance between the computer and the server, the complexity of the website - e.g. if the website contains links to social media, then the server must translate the IP addresses of many domains.