Skip to Content
Navigation:

A stick figure smiling

Here's a preview from my zine, How DNS Works! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

Image of a comic. To read the full HTML alt text, click "read the transcript". get the zine!
read the transcript!

illustrtion of a laptop. its keyboard just says QWERTY.

the basics: dig @SERVER TYPE DOMAIN

(SERVER and TYPE are both optional)

Examples:

dig example.com
dig @8.8.8.8 NS example.com
dig TXT example.com
dig @8.8.8.8 example.com

default type: A
default server: from /etc/resolv.conf
(on Linux)

tip: put +noall +answer in your ~/.digrc

This makes your output more readable by default, and you can always go back to the full output with dig +all.

dig +noall

Hide all output. Useless by itself, but dig +noall +authority will just show you the “Authority” section of the response.

dig +short DOMAIN

Only show the record content.

$ dig +short example.com 93.184.216.34

dig +trace DOMAIN

Traces how the domain gets resolved, starting at the root nameservers.

This avoids all the caches, which is useful to make sure you set your record correctly.