There are many ways to perform a DNS lookup. You can do it through any web browser, even from a smartphone, or if you prefer, there are different built-in commands inside most popular OSes. These commands are the NSlookup command, host command, and dig command. You can use them for a quick check of your domain and troubleshooting problems.
Dig command is one of the favorite commands for the majority of DNS administrators. It is built-in in most Linux distros, and you can access it through the Terminal application. You can use it to check different DNS records, perform a reverse DNS lookup, and even trace the route of a DNS query.
To use Dig for a particular DNS record type, use the following syntax:
dig domain name record type
Example with google.com as the domain name and MX as the type of DNS record:
dig google.com MX
You can use it with A, AAAA, NS, PTR, SOA, TXT records too.
Many options can refine your DNS probing. You can select the port you want to use, set the protocol for the lookup, modify the answer, and more.
The NSlookup is a very popular command for DNS probing because you can find it built-in on Windows, macOS, and Linux.
It has less functionality than the dig command, and often IPv6 resolution does not work correctly but still function for many scenarios.
You can see different DNS types, select the port for the DNS lookup, increase the waiting time, probe domains and IP addresses too.
To use NSlookup for a particular DNS record type, use the following syntax:
nslookup -type=TYPE domain name
Example with google.com as the domain name and NS as the type of DNS record:
nslookup -type=NS google.com
The host command is another popular command on Linux computers. While it is a bit outdated, in comparison with the dig command, it can still provide you useful information about a domain name.
Just like the previous software, this one has a command-line interface too. It also has many different options for modifying your DNS lookup. You can check a domain name or IP address, works with IPv4 and IPv6 too, you can adjust waiting time, choose retry number, and more.
To use host command for a particular DNS record type, use the following syntax:
host -dns type domain name
Example with google.com as the domain name and CNAME as the type of DNS record:
host -cname google.com
Many online utilities can help you to check DNS records. Here we have 3, that are safe, easy to use, and reliable.
You can use Google’s Public DNS to query a domain name or an IP address. Visit dns.google.com, and there you can put one of the two. After that, you can see all DNS records, or specify which type of DNS records you want to see from A, AAAA, CAA, CNAME, DNAME, NAPTR, NSEC3PARAM, MX, SPF, and more. It also shows DNSSEC details.
DNS.computer also works with IP address or domain name. What it can provide you as an answer is DNS resolution time from different locations in the world. That will help you see if you have a specific geographic region that you haven’t covered well and the service is slower there. You will also see the names of the nameservers the domain has, A records, and SOA records.
The Mxtoolbox is another site that can give you in-depth information about the DNS records of a host. It works well with A, AAAA, MX, DKIM, DMARC, SRV, SPF, DS, TXT, and more DNS record types.