Posts HOW TO: Linux Command For Check DNS Record With "DIG"

HOW TO: Linux Command For Check DNS Record With "DIG"

Have in your mind occurred for check DNS Record own domain or domain of other? If you want check information about domain after your changed? this tutorial will give a little tutorial about DNS Record.

DNS is an Internet service that translates domain names into IP addresses. Each time you use a domain name, DNS translates the name into the corresponding IP address. In order to do the translation DNS holds records for each domain. The most important are the A, CNAME, and MX records. The A record stores the host IP address. The CNAME is an alias record, which is used to give multiple aliases to a single computer. The MX record is the mail exchange record, which tells mail servers how to route email for this domain.

Because i don’t have a Top Level Domain like .net, .com,, .info etc. So for example i use slackware domain, sorry its just example not for crime.

# Example domain

$ dig
; <<>> DiG 9.10.3-P2 <<>>
;; global options: +cmd
;; Got answer:
;; -»HEADER«- opcode: QUERY, status: NOERROR, id: 17362
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 1

; EDNS: version: 0, flags: do; udp: 4096
;                 IN      A

;; ANSWER SECTION:          14400   IN      A

;; AUTHORITY SECTION:          86400   IN      NS          86400   IN      NS          86400   IN      NS          86400   IN      NS

;; Query time: 1289 msec
;; WHEN: Tue Jan 26 19:18:07 WIB 2016
;; MSG SIZE  rcvd: 145

By default dig is quite verbose. One way to cut down the output is to use the +short option:

$ dig +short

However, for diagnosing DNS problems, you generally need fuller output. You can find a happy medium by putting the following lines into a file called .digrc in your home directory:


So these tutorial about Linux command to check dns record.

Happy Testing and Good Luck! Arief

This post is licensed under CC BY 4.0 by the author.