How to perform DNS lookup and troubleshoot DNS How to perform DNS lookup...

How to perform DNS lookup and troubleshoot DNS


The Domain Name System (DNS), is a key component of the Internet that maps a domain name to an IP address. There are mainly 2 ways to lookup the DNS records of a domain name, via the Command Line or use an online GUI lookup tool.

NSLOOKUP with Windows

1. Launch Windows Command Prompt by navigating to Start > Command Prompt or via Run > CMD. Replace with the domain that you want to test:
2. Type nslookup to lookup the A record of
3. Type nslookup -type=ns to lookup the name server records of If -type is not specified, it looks up the A record of the domain by default.
4. Type nslookup -type=MX to lookup the MX records of against the server at does not host domain name so the query is refused.

DNS Lookup

DIG with Linux and Mac OSX

Linux and Mac OS use DIG to look up DNS records of a domain though you can use NSLOOKUP with MAC OSX Terminal as well. You can follow the below steps: 1. Open a terminal window. The procedure to do this depends on the operating system and desktop environment:
-On Mac OS X, click Applications, click Utilities, and then click Terminal.
-On Linux, open a terminal window.
2. At the command prompt, type the following command. Replace with the domain that you want to test. dig

To use a specific DNS server for the query, use the @ option. By default, dig displays the A record for a domain. To look up a different DNS record, add it to the end of the command. The below looks up the MX records of using one of Dynu name servers dig MX

3. Dig displays a QUESTION SECTION (the request) and an ANSWER SECTION (what the DNS server sends in response to the request). In this case, we used the default options for dig, which simply looks up the A record for a domain. From this, we can see that currently points to IP address

[user@localhost ~]# dig ; <<>> DiG 9.9.4-RedHat-9.9.4-73.el7_6 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58057
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 512
; IN A

;; Query time: 8 msec
;; WHEN: Tue Sep 29 15:50:42 MST 2020
;; MSG SIZE rcvd: 56
Online DNS lookup tools

If you are not familiar with commands, you can always use our DNS Lookup and DNS Propagation tools. The DNS lookup tool allows you to lookup the DNS records of a given domain against any public DNS server or authoritative DNS servers. We will explain later the difference of these 2. When you make a DNS change, the change may take some time to propagate over the internet due to TTL and DNS caching. The DNS propagation tool allows you to view DNS resolution on public name servers all over the world.

Name servers

When you register a domain name, you need to set the name servers at the company where you bought the domain name and those name servers will be queried for resolving your domain name. If you host your DNS with us, you need to list our name servers at the registrar for your DNS settings with us to work.

You need to then set up the DNS zones which include all your DNS records with the name servers you listed at the registrar. In the DNS zone, there are also name server records and they should match the name servers you list at your registrar. These name servers are authoritative DNS servers for your domain name. Authoritative DNS servers only answer DNS queries for domain names whose zones are hosted with them, which is why refused the query for in section 1.

A public recursive name server (also called public DNS resolver) is a name server service that networked computers may use for query to the Domain Name System (DNS) of all domains. It queries the authoritative DNS servers for answers and returns the results to the end-users.

* (Your email address will not be published.)