Both web-based utilities and command-line tools can be used to conduct these tests.
Troubleshooting DNS with web-based tools
For instance, to check if DNS propagation is complete, you can visit WhatsMyDNS.net. Enter a domain name, and the site will show a global map with the IP address associated with the domain across various DNS servers worldwide.
For more advanced DNS testing, you can use the online dig interface at DigWebInterface. To view the A record of a domain (which reveals its associated IP address), follow these steps:
- Go to DigWebInterface.
- In the “Hostnames or IP addresses” text box, type the domain you want to test.
- In the “Type” drop-down menu, select “A” (you can also test other DNS record types like MX and CNAME).
- Under “Options,” check the box for “Show command.”
- Under “Nameservers,” select the DNS server you want to use for the query (you can stick with the default or use a specific DNS server like OpenDNS or Google).
- Click Dig. The results will display the output from the dig command, including the domain name and its associated IP address if an A record is configured.
Troubleshooting DNS with command-line tools
Using nslookup on Microsoft Windows
To run nslookup on Microsoft Windows, follow these steps:
Open the Command Prompt: First, click on Start, then choose Run. In the Run dialog box, type
cmd
and press Enter. This will open the Command Prompt window.Run the nslookup Command: In the Command Prompt, type the following command, replacing
example.com
with the domain name you want to query:nslookup example.com
Press Enter after typing the command.Use a Specific DNS Server (Optional): If you want to use a specific DNS server to perform the lookup, you can specify the server’s IP address or hostname. For example:
nslookup example.com 208.67.222.222
This command will queryexample.com
using the OpenDNS server with the IP address208.67.222.222
.Enter Interactive Mode: To enter interactive mode, simply type
nslookup
at the command prompt and press Enter. Once you see the>
prompt, you can enter additional commands. For instance, to query the MX records forexample.com
, type:set type=MX
example.com
Server: This shows the DNS server that was used to perform the query (in this case, OpenDNS).
Address: The IP address of the DNS server used for the query.
Name: The domain name that was queried (e.g., example.com
).
Address: The IP address associated with the domain (e.g., 93.184.216.119
).
Using dig on Apple Mac OS X and Linux
Open a terminal window.
On Mac OS X, go to Applications > Utilities, and click Terminal.
On Linux, simply open a terminal window.Run the dig command.
At the command prompt, type the following command, replacingexample.com
with the domain you want to test:dig example.com
To use a specific DNS server for the query, you can use the
@
option. For example, to query using an OpenDNS server with IP address208.67.222.222
, use this command:dig @208.67.222.222 example.com
By default, dig will display the A record (IP address) for a domain. If you want to look up different DNS records, simply add the record type to the command. For example, to look up the MX (mail exchanger) records for
example.com
, type:dig example.com MX
Interpret the output.
After running the command, you’ll see a detailed output. Here’s an example of what the results might look like when querying forexample.com
:
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46803
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;example.com. IN A
;; 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)
;; WHEN: Thu Jan 9 16:07:09 2014
;; MSG SIZE rcvd: 45
- QUESTION SECTION shows the DNS query (what you asked for).
- ANSWER SECTION gives the response from the DNS server, showing that
example.com
points to the IP address93.184.216.119
. - The
SERVER
field shows the DNS server used for the query.
From the output, you can confirm the IP address of the domain and troubleshoot any DNS-related issues.