Testing your DNS IPs from /etc/resolv.conf

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » DNS

Testing your DNS IPs from /etc/resolv.confLast Modified: Sep 28, 2015, 12:46 am
If you get DNS lookup errors, it might be invalid IPs set in the file:


The resolver will start at the first "nameserver" entry and work it's way down.

A sample /etc/resolv.conf might look like


You might have IPs specified listed by your datacenter, to use their nameservers.

To test the lookup the record of a domain: with a specific DNS IP: , set the values you want, and run the following:

dig A google.com @

You might get output like this:

[root@es6-64 ~]# dig A google.com @

; <<>> DiG 9.7.0-P2-RedHat-9.7.0-5.P2.el6 <<>> A google.com @
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15679
;; flags: qr rd ra; QUERY: 1, ANSWER: 16, AUTHORITY: 0, ADDITIONAL: 0

;google.com.                    IN      A

google.com.             207     IN      A

;; Query time: 34 msec
;; WHEN: Mon Sep 28 00:09:49 2015
;; MSG SIZE  rcvd: 284

Where the value you're looking for is the IP under the ;; ANSWER SECTION.
  • A return value can have many results, which should all be displayed if the domain resolves to more than one place.
  • If you get a blank IP in the result, it would imply that the nameserver is responding, but the domain in question is not on that server, and recursive queries are disabled. (we don't want recursive queries enabled)
  • If you cannot connect at all ensure that "named" is running, and port 53 for both TCP and UDP are open in your firewall.  Add the option +tcp or +notcp to explicitly test TCP and UDP, respectively.  Lookups will usually be using UDP if not specified.

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST