With a web-based tool
- Open a web dig tool, for example
digwebinterface.com, in your browser. - Type the domain in the Hostnames or IP addresses box.
- In Type, choose the record type, such as A, MX or TXT.
- Under Options, tick Show command.
- Under Nameservers, choose the server to ask (for example, the authoritative server of the domain, or a public one).
- Click Dig. The page shows the answer and the dig command it used.
nslookup on Windows
- Open the Command Prompt (click Start, type
cmdand pressEnter). - Run (replace
example.com):
nslookup example.com
- To ask a certain DNS server, add its name or IP address:
nslookup example.com 8.8.8.8
- By default, nslookup looks up the A record. For another record type, set the type first:
nslookup
> set type=MX
> example.com
- Read the answer. For example:
Server: resolver1.opendns.com
Address: 208.67.222.222
Name: example.com
Address: 93.184.216.119
The first lines show the DNS server that answered. The last lines show the result.
dig on Linux and macOS
- Open a terminal. On macOS: Applications, Utilities, Terminal.
- Run:
dig example.com
- To ask a certain DNS server, use
@:
dig @208.67.222.222 example.com
- For another record type, add it:
dig example.com MX
- Read the answer. The important part is the ANSWER SECTION:
;; ANSWER SECTION:
example.com. 2424 IN A 93.184.216.119
;; Query time: 12 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
example.com.is the name you asked for.2424is the TTL (time to live) in seconds.Ais the record type and93.184.216.119is the value.Query timeis how long the answer took.SERVERis the DNS server that answered.
Useful short forms:
dig +short example.com
dig +short NS example.com
dig +trace example.com
What to look for
- No answer, or the wrong IP: the record is missing or wrong in the DNS zone.
- Different answers from different servers: the change has not spread yet. DNS changes can take up to 48 hours.
- Check the NS records to be sure the domain uses the nameservers you expect.
Quick recap
nslookupon Windows,digon Linux and macOS.- Add a server name to ask a specific DNS server.
- Compare answers to find missing or old records.