1. Home
  2. How To
  3. How to troubleshoot DNS issues

How to troubleshoot DNS issues

Troubleshoot with web-based online tools

There are many websites available that provide free services for troubleshooting DNS issues. This is the easiest option to find reason for DNS failure.

Examples:

  • To check the health of your domain DNS and mail server reports, you can visit – https://intodns.com
  • To check your domain names current IP address and DNS record information from different locations, you can check it from –  https://www.whatsmydns.net/ This website helps you to check the current state of DNS propagation.
  • You can check if private nameservers are registered correctly or not using this website – https://www.internic.net/whois.html Search for nameservers, the result will come with your IP address if you add private nameservers correctly. Server Name: NS1.EUROVPS.COM IP Address: 77.235.63.12

Troubleshoot with command Line tools

Don’t want to use an online tool? No problem, there are many ways that you can troubleshoot using the command line like a pro.

Troubleshooting DNS issues on Linux or Mac

Dig command

This tool is the favorite/powerful command-line tool for DNS troubleshooting and helps you dig into DNS issues. It is installed by default on many operating systems, including Linux and Mac OS X.

Format : dig hostname

[root@eurovps ~]# dig eurovps.com

Here is the example with website google.com

[root@eurovps ~]# dig google.com

; <<>> DiG 9.9.4-RedHat-9.9.4-61.el7_5.1 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39888
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             130     IN      A       216.58.212.174

;; Query time: 0 msec
;; SERVER: 62.212.64.122#53(62.212.64.122)
;; WHEN: Sun Mar 03 07:16:53 EET 2019
;; MSG SIZE  rcvd: 55

dig +trace

We can perform a trace on the DNS lookup path with the +trace option.

Format : dig +trace domainname

[root@eurovps ~]# dig +trace eurovps.com

Let’s use dig +trace www.google.com as our command with a domain name and we can see what actually happens

[root@eurovps ~]# dig +trace google.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> +trace google.com
;; global options: +cmd
.                       498137  IN      NS      h.root-servers.net.
.                       498137  IN      NS      i.root-servers.net.
.                       498137  IN      NS      a.root-servers.net.
.                       498137  IN      NS      l.root-servers.net.
.                       498137  IN      NS      k.root-servers.net.
.                       498137  IN      NS      d.root-servers.net.
.                       498137  IN      NS      e.root-servers.net.
.                       498137  IN      NS      f.root-servers.net.
.                       498137  IN      NS      m.root-servers.net.
.                       498137  IN      NS      b.root-servers.net.
.                       498137  IN      NS      j.root-servers.net.
.                       498137  IN      NS      g.root-servers.net.
.                       498137  IN      NS      c.root-servers.net.
;; Received 508 bytes from 77.235.33.38#53(77.235.33.38) in 15 ms

com.                    172800  IN      NS      a.gtld-servers.net.
com.                    172800  IN      NS      b.gtld-servers.net.
com.                    172800  IN      NS      c.gtld-servers.net.
com.                    172800  IN      NS      d.gtld-servers.net.
com.                    172800  IN      NS      e.gtld-servers.net.
com.                    172800  IN      NS      f.gtld-servers.net.
com.                    172800  IN      NS      g.gtld-servers.net.
com.                    172800  IN      NS      h.gtld-servers.net.
com.                    172800  IN      NS      i.gtld-servers.net.
com.                    172800  IN      NS      j.gtld-servers.net.
com.                    172800  IN      NS      k.gtld-servers.net.
com.                    172800  IN      NS      l.gtld-servers.net.
com.                    172800  IN      NS      m.gtld-servers.net.
;; Received 488 bytes from 198.97.190.53#53(198.97.190.53) in 159 ms

google.com.             172800  IN      NS      ns2.google.com.
google.com.             172800  IN      NS      ns1.google.com.
google.com.             172800  IN      NS      ns3.google.com.
google.com.             172800  IN      NS      ns4.google.com.
;; Received 276 bytes from 192.31.80.30#53(192.31.80.30) in 31 ms

google.com.             300     IN      A       172.217.20.110
;; Received 44 bytes from 216.239.32.10#53(216.239.32.10) in 4 ms

Query DNS from Specific Name Server

We can specify a name server to send the query to with the @ symbol, followed by the hostname or IP address of the name server.

[root@eurovps ~]# dig eurovps.com @ns1.eurovps.com

Here is the example for google.com from nameserver ns1.google.com

[root@eurovps ~]# dig google.com @ns1.google.com

; <<>> DiG 9.9.4-RedHat-9.9.4-61.el7_5.1 <<>> google.com @ns1.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47655
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             300     IN      A       172.217.19.206

;; Query time: 4 msec
;; SERVER: 216.239.32.10#53(216.239.32.10)
;; WHEN: Sun Mar 03 07:13:40 EET 2019
;; MSG SIZE  rcvd: 55

Troubleshooting DNS issues on Windows

nslookup

To perform a DNS query on a Windows computer, follow these steps:

Go to Start->Run and type in “cmd” then click “OK.”

In the command prompt, execute the following command with the domain/hostname that you want to check.

nslookup eurovps.com

Format : nslookup hostname

C:\Users\eurovps>nslookup eurovps.com

Example with google.com

C:\Users\eurovps>nslookup google.com
10.in-addr.arpa
        primary name server = bhdns.mydomain.ca
        responsible mail addr = bhdns.mydomain.ca
        serial  = 1
        refresh = 28800 (8 hours)
        retry   = 7200 (2 hours)
        expire  = 864000 (10 days)
        default TTL = 86400 (1 day)
Server:  UnKnown
Address:  XXX.XXX.XX.XX

Non-authoritative answer:
Name:    google.com
Addresses:  2404:6800:4007:80d::200e
          172.217.163.110


C:\Users\evs_proust

To check a specific DNS record, you need to specify the nslookup command, an optional record type (for example, A, MX, or TXT), and the hostname that you want to check.

Note: DNS records can take up to 48 hours to propagate worldwide.

Updated on May 31, 2019

Was this article helpful?

Related Articles