When we think about building a website, we often neglect the DNS. Not that we don’t care about the speed. We are thinking about web site’s theme, menus, plugins, and somehow one key component for fast loading sites, the DNS lookup, often is forgotten. Let’s see why the DNS lookup is so important.
What is DNS lookup?
DNS lookup is the process that a DNS client needs to do, to obtain a DNS record or DNS records for the domain it needs. The DNS records contain important information about the domain like its IP address, data about its mail servers, security, authentication, and more.
It involves the DNS client that your device use, Recursive DNS servers that will search for the DNS records you requested, and an Authoritative DNS server that will answer the question.
There are two common types:
When you are performing a Forward DNS lookup, you are imputing the domain name (hostname). The answer should be the IP address of the host. When the DNS client obtains the IP address, then it can connect to the domain.
When you are performing a Reverse DNS lookup, you are imputing an IP address. What you will get is the hostname. This lookup is used for verification purposes for emails or other services. To check that the IP address really belongs to the domain.
Why is it important?
DNS lookup is important because:
- It brings the IP address of the host to you, so you can reach it. You need the A DNS record to see the IP address of the domain, to know where exactly it is.
- It is additional time that you need to wait until you open a page. If the domain resolution happens faster, thanks to a better DNS provider, you will start to load the site earlier and have a better experience.
- DNS lookup (the Reverse lookup) serves to check if a particular IP address is really related to the domain name it shows. You can use it to prevent phishing attacks, and in general, it is used to check the authenticity of emails.
- Use it to check the performance of your domain. You can see all the record types, see which name servers are responding to your queries, and use the information to improve your DNS network. Faster DNS resolution means faster loading for your site, so it is worth it to check it often.
When do we use DNS lookup?
We are using it when we reach a website through a web browser and use a cloud-based app or service.
You can also use some of the built-in commands that you have on your computer and perform a specific lookup for the DNS record type (A, AAAA, MX, CNAME, etc.) you are interested in. You can use the Nslookup command (Windows, macOS, Linux), Dig command (Linux), or Host command (Linux). You can use these utilities to check the performance of your domain.
DNS lookup is an essential process of reaching a host. It searches for its IP address and brings it back. The faster the process is the better experience the user who requested a domain will have.