Chapter 9: Domain Names, DNS and Subdomains
9.9 Verify DNS: dig, nslookup and friends
Friends, don't guess when a domain doesn't work – use dig. This command shows exactly what answer DNS gives.
मित्रांनो, डोमेन चालत नाही म्हणून अंदाज लावू नका – dig वापरा. ही कमांड DNS नेमकं काय उत्तर देतं ते दाखवते.
दोस्तों, डोमेन नहीं चल रहा तो अंदाज़ा मत लगाओ – dig इस्तेमाल करो. ये कमांड दिखाती है कि DNS ठीक-ठीक क्या जवाब देता है.
For a quick public practice check on an approved network, use one of these questions for the IANA example domain. Compare the outputs only after confirming the name, type and actual queried server.
dig +time=2 +tries=1 example.com. A
nslookup -timeout=2 -retry=1 -type=A example.com.
host -W 2 -R 1 -t A example.com.Use available lookup tools first. Amazon Linux 2023 provides BIND tools in bind-utils. Ubuntu provides bind9-dnsutils and may list dnsutils as a transitional package. Check your distro’s available packages if a tool is missing.
Reading dig output:
;; ANSWER SECTION:
dairy.example.test. 120 IN A 192.0.2.51
name TTL(s) class type value
Keep the initial evidence. Ask the full question at the applicable authority and client resolver, then use a named request to verify the actual web path. Different caches and tools can return different results. Clear a specific cache only after there is evidence it is relevant and the action is approved for the machine.
Ravindra Bagale's Tip
Read the full DNS status, record type, returned value and server. Then verify the intended named URL and normal TLS if applicable. A correct DNS reply can still lead to a wrong virtual host, stale IPv6 target or a certificate problem.
Ravindra Bagale's Tip – मराठी
पूर्ण DNS status, record type, उत्तर आणि resolver नोंदवा. मग योग्य नावाचा URL आणि लागू असेल तर TLS तपासा. DNS उत्तर बरोबर असलं तरी वेब route वेगळा असू शकतो.
Ravindra Bagale's Tip – हिंदी
पूरा DNS status, record type, उत्तर और resolver दर्ज करें. फिर सही नाम वाला URL और लागू होने पर TLS जाँचें. DNS उत्तर सही होने पर भी वेब route अलग हो सकता है.
Lab
Chala, compare the four actual private DNS responses below. Record status, answer count, type and responding port. Try the optional documentation-domain queries only where permitted. The outcome does not require flushing caches.
Ask one precise question when a name fails
Friends, the dairy has asked the hosting and DNS teams to bring up its pickup page. One user says the name works and another says it does not. Before waiting or clearing anything, write down the full hostname, the requested record type and which resolver will answer. Then record the actual result and time. “DNS down” is too broad to tell whether a name is absent, an IPv6 record is missing, one resolver cannot finish its work or a browser reached a website with a certificate problem. A DNS diagnostic begins with a question we can repeat.
The three tools in this lesson send DNS questions. Dig is useful for seeing the returned status, server and complete answer sections. Nslookup is available on many systems and can ask for a chosen record type. Host offers a compact DNS display suitable for a quick comparison when installed. Try the approved public example to see actual tool output. Then a private loopback exercise provides controlled results for four situations that can all confuse a person looking only at one printed address. Neither exercise changes the operating system's resolver settings.
A DNS tool generally sends its own query to a specified server or according to its configuration. An application can use another path such as a system-specific name service, local mappings or an encrypted resolver. Its view may differ from a tested dig result. Name your source when describing success. A reported address from one resolver confirms an observation about that question. A successful ordinary HTTPS visit still needs the intended destination, certificate and named response. We will use both classes of observation only for the questions they are designed to answer.
Read a full result from dig before shortening it
In the public practice commands, example.com. is the IANA-maintained documentation domain written as an absolute hostname. The ending dot marks the root boundary in DNS notation and keeps the exercise's name clear. A asks for IPv4 address data. AAAA would ask for IPv6 data. Use the requested type explicitly so a colleague can repeat your test. A complete URL with a scheme, port and path does not belong in this DNS name input. Copy only the hostname that the actual request uses.
Dig's response header includes the status code. NOERROR commonly accompanies a successful answer, and it can also appear when an existing name has no usable data of the requested type. NXDOMAIN is a negative response indicating nonexistence in its applicable answer context. SERVFAIL means the responding server could not provide the requested resolution outcome. A timed-out tool might not have received any DNS response at all. Read answer counts and contents together with the status. A zero answer count in a particular section can have other meanings, such as a referral. The sequence in each output matters.
Read the question section to verify the name, class and type. Then read each line in the answer section from left to right. A typical address record shows the actual owner, TTL in seconds, the Internet class shown as IN, the record type and its data. A CNAME row has a target name instead of an IP address, so an A lookup can show a chain followed by a downstream address in some responses. The assigned TTL applies to the displayed record. It can differ by record type, record set or stage in a chain.
The authority section can show who controls a delegated branch or show zone metadata relevant to a negative answer. The additional section can carry supporting data such as related addresses or protocol information. Read enough of the response to distinguish these roles. A list of NS names in an authority section can be a referral while an NS record in the answer section can be the requested data. A response's SERVER line says what responder the tool reached for that exchange. It is not a list of every authority consulted by a recursive resolver.
Flags provide another observation. The rd flag means recursion was requested. ra indicates the server offers recursion under its configuration. The aa flag denotes authoritative answering for the applicable name under DNS rules. These are message fields, not a replacement for knowing which server you directly asked. In a supported test, compare a direct nonrecursive question to a known delegated authority with a normal recursive question. The direct and recursive tests explain different pieces of the final result.
The +short option is convenient once you understand the query. It focuses on compact data and suppresses diagnostics you need when troubleshooting. If it prints nothing, return to full output and inspect the status and authority section. BIND documents a dig command exit status of zero for a received DNS response, including NXDOMAIN. A shell condition alone therefore does not prove a positive answer. Automation or a release check should examine the appropriate response and fields, not just whether the command process exited normally.
Choose the respondent for the question you want answered
Use the default query path to observe what that tool asks without an explicit server override. Read the actual SERVER line. This is a useful start when investigating a client's environment, and you may still need to confirm which resolver the affected application uses. To compare an authorized specific resolver, dig accepts an explicit server argument with an at sign as part of the command. Substitute only the resolver approved for that diagnostic. Public example names can be tested on a public service if permitted. Internal hostnames should stay within their approved resolution path.
For a direct authority test, identify the actual delegated nameservers or the intended new assigned authorities in a planned migration. Ask the exact one you want, use a known name and type and specify +norecurse to request a nonrecursive exchange. Inspect the authoritative flag and applicable result. One tested server's data can be compared with another's under the required service rules. Record which authority was contacted rather than assuming its provider by the suffix of one example name. A hosting panel and a direct reply are two distinct observations.
When one resolver returns a prior address and another returns a replacement, compare their query destinations, times and shown TTLs. The same host and type are needed for a useful comparison. Different valid routing policies can also yield different addresses intentionally. Check the documented expected set before declaring any mismatch. A resolver's TTL can count down from the cached copy. Its number says nothing about a different resolver's cache. If a newly added name still gives a prior negative response, the full output and authority metadata can help distinguish its status from failed resolution.
Dig's +trace mode performs its own iterative walk and may need to contact multiple servers directly. It is useful when your network permits those exchanges. It does not reproduce the exact history of the configured recursive service's cache. Some networks allow DNS only through specific resolvers, so a direct trace can fail while ordinary queries work there. Use the permitted diagnostics and note which observation is unavailable. A network failure from a trace is evidence about that tool path, not automatic proof that the exact public name is broken.
Compare alternative tools and the next service check
Try nslookup with an explicit type. It can display the responder and the returned values and can also support interactive commands. The details of output and options vary by implementation. Microsoft documents its own Windows version, and BIND provides an implementation used on other systems. A compact line described as non-authoritative normally indicates the selected recursive resolver provided the answer. That can be exactly the result needed to describe the client resolver. If you need a TTL, response flags or the distinction between answer and authority, use the tool and mode that actually shows them.
Host offers a quick named-address observation where installed. Choosing a type explicitly helps prevent a different program default from widening the query. Dig, nslookup and host may show results in different orders without a meaningful difference in the record set. Match the owner and type and compare the expected data. Separate output formatting from true discrepancies, such as an unexpected CNAME, a missing address family or a negative response from one resolver.
To check a website after looking at DNS, choose its normal hostname and scheme and an appropriate safe path. A browser connection can follow additional steps involving network access, TLS and site selection. A plain HTTP probe with an explicit Host header can help isolate a named handler at an authorized endpoint. It does not reproduce a normal TLS handshake for a named HTTPS URL. Use the proper URL and certificate verification if that is the service you need. Compare actual response and body with the goal. A curl request with a forced mapping checks the target without depending on the normal DNS answer, so document that choice separately.
A local cache operation can affect only the layer it controls. Clearing one operating system cache does not erase cached records in a recursive provider, nor does it rewrite browser HTTP cache, active connections or authoritative data. Follow current system-specific instructions if you have an authorized reason to do it and scope the observation. It is often more informative to compare the authoritative, recursive and application results first. The exercises here require no cache flush. That preserves the exact earlier evidence when a second student checks the case.
Run a few read-only public comparisons
On an approved network that permits ordinary DNS questions, choose the installed tools below. The first commands ask for A and AAAA separately. The next asks about a deliberately reserved invalid name to show the shape of a negative result under normal DNS behavior. The remaining two compare how another tool displays the same A question for the public IANA example. No values from these lookups should be copied as deployment targets. If anything is unavailable, record which command and why rather than substituting an invented answer.
dig +time=2 +tries=1 example.com. A
dig +time=2 +tries=1 example.com. AAAA
dig +time=2 +tries=1 example.invalid. A
nslookup -timeout=2 -retry=1 -type=A example.com.
host -W 2 -R 1 -t A example.com.
The precise answer data can change. At the time you make the observation, capture the status and what the test actually returned. A successful A query can show more than one IPv4 value, and a successful AAAA query can show multiple IPv6 values. The two record types belong to distinct address families. A command run with a different destination, search configuration or type could produce a different result. An address should be interpreted as DNS evidence for the observed name and query, which is narrower than website reachability.
The reserved invalid name is intended to produce NXDOMAIN with an ordinary appropriate resolver. Read the status even if there is no address in the answer. Some networks may synthesize or filter results. If you see a timeout or another status, record that observation and use the private exercise to learn the distinction. An empty short answer can represent this expected negative result. It can also obscure a missing type. Reading the header and authority data is the habit the exercise asks you to practice.
For nslookup, identify the responding server before the answer. Its display might call a result non-authoritative when recursing through the configured service. The host utility may summarize the names and addresses more compactly. Compare the address set for the same owner and type, and ignore ordering unless an application-specific contract depends on it. The goal is not to force identical screen text. The relevant evidence is whether each tool asked what you intended and which answer it obtained.
Read four controlled DNS outcomes on loopback
Use Python 3.7 or newer and dig for the next exercise. The temporary Python server binds UDP to loopback on a port the operating system chooses. It answers only the tiny supplied set of record questions used by the lab, with no external lookups. Each dig call uses that explicit address and port, disables recursion and requests one known name and type. The server shows realistic DNS fields for a teaching fixture. It is not meant to be a production DNS service or a test of your machine's normal DNS provider.
Predict four rows. The dairy's A result is one documentation IPv4 value. The same owner has no AAAA in this miniature zone and should show NOERROR with zero answer rows and an SOA in the authority section. A different invented owner is deliberately absent and should show NXDOMAIN with its appropriate negative evidence. A simulated resolver failure returns SERVFAIL. The failure case is an explicit output for the exercise, not a real network or DNSSEC incident. Comparing the four against one responder lets you concentrate on the differences in result type.
python3 - <<'PY'
import socket
import socketserver
import struct
import subprocess
import threading
zone = "dairy.example.test."
def dns_name(text):
labels = [label.encode("ascii") for label in text.rstrip(".").split(".")]
return b"".join(bytes([len(label)]) + label for label in labels) + b"\0"
def rr(owner, kind, ttl, data):
return owner + struct.pack("!HHIH", kind, 1, ttl, len(data)) + data
soa_data = (
dns_name("ns.dairy.example.test.") + dns_name("hostmaster.dairy.example.test.")
+ struct.pack("!IIIII", 1, 3600, 600, 86400, 45)
)
soa = rr(dns_name(zone), 6, 45, soa_data)
class TeachingDNS(socketserver.BaseRequestHandler):
def handle(self):
query, reply_socket = self.request
if len(query) < 17 or query[4:6] != b"\0\1":
return
offset = 12
labels = []
while offset < len(query) and query[offset]:
size = query[offset]
if size > 63 or offset + 1 + size > len(query):
return
labels.append(query[offset + 1:offset + 1 + size])
offset += 1 + size
if offset + 5 > len(query):
return
question_end = offset + 5
kind, dns_class = struct.unpack("!HH", query[offset + 1:question_end])
if dns_class != 1:
return
name = b".".join(labels).decode("ascii", errors="replace") + "."
answer, authority, code = b"", b"", 0
flags = 0x8400 # Reply and authoritative for these invented zone cases
if name == zone and kind == 1:
answer = rr(b"\xc0\x0c", 1, 120, socket.inet_aton("192.0.2.51"))
elif name == zone and kind == 28:
authority = soa
elif name == "absent." + zone and kind == 1:
authority, code = soa, 3
elif name == "failure." + zone and kind == 1:
flags, code = 0x8000, 2
else:
return
header = struct.pack("!6H", int.from_bytes(query[:2], "big"), flags | code,
1, int(bool(answer)), int(bool(authority)), 0)
packet = header + query[12:question_end] + answer + authority
reply_socket.sendto(packet, self.client_address)
checks = [
(zone, "A", "NOERROR", 1, "192.0.2.51"),
(zone, "AAAA", "NOERROR", 0, "SOA"),
("absent." + zone, "A", "NXDOMAIN", 0, "SOA"),
("failure." + zone, "A", "SERVFAIL", 0, "status: SERVFAIL"),
]
with socketserver.UDPServer(("127.0.0.1", 0), TeachingDNS) as service:
worker = threading.Thread(target=service.serve_forever, daemon=True)
worker.start()
try:
port = str(service.server_address[1])
for name, kind, code, count, marker in checks:
result = subprocess.run(
["dig", "@127.0.0.1", "-p", port, "+time=2", "+tries=1",
"+norecurse", "+noedns", name, kind],
check=True, capture_output=True, text=True, timeout=4,
)
print(result.stdout.strip())
assert f"status: {code}" in result.stdout
assert f"ANSWER: {count}," in result.stdout
assert marker in result.stdout
finally:
service.shutdown()
worker.join()
print("Private test socket closed.")
PY
Read the first result and point at the record type and value. The status is NOERROR, the answer count is one, and the result includes the documentation address. Next read the AAAA response. The owner is the same, the status is still NOERROR, and the answer count is zero. Its authority data includes the workshop SOA. In this controlled context it is no data of the requested type rather than absence of the owner. Now compare the missing name response. Here the query name changed and the header says NXDOMAIN, which is useful evidence that the name is absent in the fixture's zone.
In the final row the reply is a deliberate SERVFAIL. The tool still received a valid packet, so its command exit does not prove useful DNS data. The response flags in this example differ from the earlier authoritative rows because the fixture is modeling a failure. Use the correct diagnosis from the header and the known inputs. A real resolver's failure can have different underlying causes, such as unsuccessful upstream attempts or a validation issue. The diagnostic process would need another test to learn which one applies. The private result simply teaches which observation to collect first.
The Python code builds explicit controlled DNS packets. You do not need to memorize the wire encoding to read its outputs. An address value, an SOA in the authority section and a named return code give the evidence used for the lab. The temporary listener automatically closes after the known checks. The fixture uses a unique local port and never enables a system DNS daemon or publishes any record. A missing dig executable or a policy preventing local loopback can be handled using the word-based worksheet below.
If you cannot run the code, make a four-row table. Write the expected query name and type, status, answer count and additional authority clue for each. Then explain which two results both have NOERROR and which ones can both omit an actual address value. A partner should be able to tell whether an issue concerns a type on an existing name, a nonexistent owner, or a server that could not complete the request. You are ready when you can make each distinction from the same set of available fields without relying on one specific operating system display.
Match the tool to the system and question
Check which tools are already installed before planning package changes. On an approved Amazon Linux 2023 setup, AWS's package listings include the bind-utils package, and the package manager used there is DNF. Ubuntu's package listings show the BIND client utilities in bind9-dnsutils, with a dnsutils transitional package in supported releases. A different distribution or newer release can package tools differently. Read its applicable documentation. The learner who lacks dig can still run a basic typed question with nslookup when available, or use our printed practice cases without installing anything.
On Windows, Microsoft's documented nslookup provides noninteractive lookup with a specified question and optional server. Where Windows PowerShell exposes the DnsClient module, Resolve-DnsName with a specified name and type is another option. It provides choices such as using a selected server or a DNS-specific check. Read its actual response and flags or fields as available. Do not assume two commands use every local name-service source in exactly the same order. For a browser discrepancy you may also need to know whether the application used its configured encrypted DNS or a system path.
A diagnostic flag that changes the transport also answers a narrow question. Traditional DNS can use UDP and TCP. Dig's +tcp can ask the specified DNS server using TCP. A successful TCP DNS exchange shows something about the path to that DNS port, while the eventual website has a different address or application listener. If UDP results are truncated, a compliant diagnostic can retry using TCP. For normal beginner checks follow the approved query path first, and compare transports when the observed issue makes it relevant. The private Python fixture supplies UDP only.
When selecting address families, read which part of the tool the option controls. Querying type AAAA means asking for IPv6 address records. A tool option to send the DNS query over IPv6 can instead specify how to contact the query server. You can request AAAA data over IPv4 transport or request A data over IPv6 transport if the chosen resolver path is reachable. In the eventual HTTP test, address selection for the website is another decision. This distinction helps when a diagnostic worked over one network family and returned data for the other.
A reverse lookup is also its own thing. Dig can perform a PTR question for a supplied IP address with its reverse-lookup option. That asks the operator of the reverse namespace for names associated with the address. It does not prove that the host's ordinary A record points there or that a website accepts the requested name and certificate. Include reverse DNS only if it is relevant to the deployment. For example, an administrator might need it to verify a related infrastructure requirement. The basic website readiness case instead follows the exact public name to its intended forward address and service.
Write a reproducible triage record
Start with the affected request. Ask for the exact hostname, whether the service expects plain HTTP or HTTPS, which path the user opened and roughly when the failure occurred. Ask whether a limited audience or network setup is involved. If the site is private, perform comparisons in appropriate approved environments. If it is public and the learner is allowed only a documentation example, use the prepared exercise. The note should cite the resolver and type used. A comment such as “I tried from my phone” may still omit whether that phone used mobile service, Wi-Fi or a different DNS path.
Compare the same question in each observation. For a suspected new IPv4 address, ask for A using the exact name. If the site publishes IPv6, ask for AAAA separately. Use full output for each authority and recursive result you compare. Capture the TTL only for the answer it describes. In cases involving an alias, record the owner, target and any returned downstream data. If the name exists under another spelling or a suffix has been accidentally attached, the question section can expose the mistake immediately. Copy the tool's printed query name, not solely the name you recall typing.
Use a minimal additional test for the observed status. If the expected owner has a negative result, see whether it is a missing name or a missing specific type. Compare the actual authorized record and current authority. If a resolver reports SERVFAIL, look for supporting evidence about delegation, reachability or DNSSEC validation. If no reply reached the tool, identify the test server and permitted network path. If the answer is correct, follow it into the actual web service rather than assuming every future problem is caused by a local resolver. This order is useful because each next step tests a different plausible cause.
Preserve observations instead of clearing them first. A cache flush may occasionally be the appropriate scoped action on an authorized system, but it erases one piece of what the learner was trying to compare. Save the initial answer and relevant applied state before deciding. Determine which software holds the information you suspect and check the specific tools available for it. Flushing a system cache cannot force every public provider to fetch a new record. A browser may also have a different resolver or cached web response. Use the actual evidence to decide which action is appropriate.
Report what you can prove about the web path. A correct DNS response and a failed ordinary HTTPS request should be reported together. If the TLS identity does not match, identify the actual tested hostname and relevant endpoint. If only a forced-address request succeeds, document that it used a local mapping and still needs confirmation through ordinary DNS. If a 200 comes from a fallback page, compare its marker and requested host. This teaches a helpful handoff between DNS and web teams. Neither group needs to guess which of several previous commands the report calls “working.”
Repair an incomplete evidence report on paper
A colleague sends you this report: “The record is correct because dig ran, but the browser is wrong.” Rewrite it as findings and remaining checks. State the queried server, exact owner and type and status. Attach the type and value in the response and elapsed or observed time where useful. Then describe the actual named web request and whether it used its ordinary resolver or a forced mapping. If the only checked command was a compact lookup, ask for full output. If timing or an address family could matter, add a concrete comparison with the appropriate scope.
Next suppose the response shows NOERROR and an empty answer. You accidentally queried AAAA for a known IPv4-only training owner. The same command's name, class and type can explain your observation. Check the actual A result for the identical owner and the negative context for the AAAA result. A partner may suggest the entire name is absent because the first command printed no address. Show which header and authority fields distinguish that conclusion. The private exercise gives both negative cases so you can compare their actual fields without using customer systems.
Finally suppose an application in your organization reports a different answer from a public resolver. Ask whether the application is expected to use private DNS. The private view can legitimately produce another result. Check the correct client path and applicable public or private record rather than sending internal names to an unrelated external resolver. Write who would confirm the expected policy. The exercise passes when the explanation can account for the lookup behavior without making an unauthorized change to the site or global DNS settings.
Work four complete diagnoses from partial evidence
The report shows an NXDOMAIN for a familiar brand, but nobody checked the exact question. Read the displayed question and compare it with the requested name. A spelling error or an appended local search suffix can result in a different owner than the one on the customer's receipt. Try a deliberate fully qualified name through the intended resolver. If it returns data, you found a question mismatch rather than a broken registration. If it still returns NXDOMAIN, compare the relevant delegated authority and requested name before deciding whether a record or delegation is missing. Distinguish the current response from an earlier cached negative observation.
A direct authority query yields a CNAME without an address. Read the owner and the returned canonical target. A nonrecursive server can supply its own authoritative alias while the target belongs to another zone. The advertised name is useful information and may require a separate resolution step to get an address. Query the appropriate allowed recursive path for the original name or inspect the target with relevant authority context. The absence of an inline numeric result in one display does not by itself establish that the alias is broken. Check that its intended target is actually usable and that the named service supports the original public hostname.
The selected resolver returns refusal rather than timing out. This is a reply describing the server's handling of the question. The name or type may be outside the service's configured policy or you may be using an authority that does not provide arbitrary recursion. Confirm the responder's intended role and the exact flags, then ask the correct approved server. That is different from sending the query and receiving no reply at all. In a timeout case, verify the expected path, network access and tool settings within the allowed environment. Avoid escalating a private name to a public external tool to see whether the error label changes.
One student receives a positive answer but gets a certificate error. The DNS result is one stage of the connection. Ask which address the actual client used, including whether it tried an IPv6 result. Check the exact hostname it requested and the endpoint that presented the certificate. If an authorized forced-address request to a different endpoint works, you can compare the observations without pretending they were equivalent. The intended public DNS and TLS choices still need confirmation through the ordinary path. A diagnostic command with a different host or an identity bypass would answer a different question and cannot grade the deployment.
Here is a small grading rubric for your own notes. Give one point for the exact candidate query name, one for the type, one for the selected server, one for the status and one for the observed applicable data or absence. Give a separate point for stating the next observation that would distinguish two plausible causes. For a web follow-up, write the ordinary or intentionally forced path, the actual connection stage reached and the marker or error. Finally, mark which details were inferred and which you directly observed. The rubric gives credit to a carefully documented negative answer as well as a successful positive lookup.
Try writing two versions of the same report. The first intentionally uses only an address or an empty line from a short result. The second adds the full status, question and responder details. Ask your partner what diagnosis they can make from each. For an empty result, one partner might initially say “not registered” and the other “no record of that type.” With full output, they can point to a distinguishing field and ask the affected authority when needed. The small amount of extra text pays for itself when another person repeats the case from a different environment.
An operational handoff also needs time and context. If you rerun a lookup after the published TTL or while a transition is underway, label the two times clearly so you do not compare older and newer results as if they were simultaneous. If the organization expects a managed service to return distinct healthy targets, compare each value with that documented rule. If observations only cover one name and type, say so. A carefully bounded DNS report lets the service team focus on the failing connection or handler instead of rechecking unrelated records.
Before concluding that a provider has changed its data, compare the complete returned set for the same name and type. Imagine two outputs list the same two addresses in opposite order. If the service expects both to be valid, that display order alone has little diagnostic meaning. If one output omits a destination that must be present, or includes a retired address, the difference is substantive. Write precisely which set changed and compare the relevant authority and policy. This simple discipline is especially useful when a student switches from a verbose tool to a short format.
Answer with the observed record and response code
What information do you read first in a full dig result?
I verify the question name, class and type and identify the responding server. Then I read the status, relevant answer or authority fields and any useful flags. The exact queried server matters because different authoritative and recursive observations answer different questions. A returned address and an actual named web response are separate checks.
Why does a blank dig short result need a follow-up?
The compact display can omit the status and context. It could be an absent name, an absent type or another failure. I use full output for the same question and read the answer count, code, particular records and authority details. In the live diagnosis I confirm the tested resolver and the original request too.
What does a successful dig process exit establish?
BIND documents zero when a DNS response was received, including NXDOMAIN. To verify a required record I also read the status and check that the expected answer is present. A timeout with no response is different from receiving a valid negative reply. That distinction matters for shell automation and for the interpretation of manual tests.
Why can nslookup and dig appear to disagree?
They may ask different types, use a different server or show different parts of an answer. Compare the exact same name, type and resolver and inspect the returned context. If they return the same expected set in a different order, that does not automatically reveal a DNS record change. If an application uses another resolution path, verify its path separately.
Does a failed trace prove a public name cannot be resolved?
A trace attempts its own sequence of direct queries. A network may limit that path while its configured recursive resolver returns the result normally. I would report which leg could not be observed, use an authorized normal question, and obtain further direct evidence from the appropriate environment where needed. I would not replace an active configuration based only on a blocked diagnostic path.
What should you do after observing correct DNS but the wrong HTTPS page?
Check the exact intended URL, actual destination used and TLS identity, then compare the hostname and path response. If the request reached an old IPv6 route, inspect its separately published answer. A proxy, cached response or fallback site may also explain the behavior. Use a named endpoint probe and matching response marker to determine the earliest difference.
Choose the next DNS or web observation
A full result prints NOERROR, zero answers and an SOA for the zone. The exact same owner has an A answer and this question was AAAA. What does it suggest?
Answer and reasoning
In this context the owner exists and the requested address type is absent. The displayed SOA contributes to the negative response context. It does not turn the query into a request for the SOA itself.
The local exercise's failure returns SERVFAIL. Which evidence remains unknown?
Answer and reasoning
The response reveals that the requested resolution could not be completed. The code is simulated. For an actual incident, inspect which authority and validation or network path is involved to determine the underlying reason.
A dig answer's server line names your router. Does that prove the router is authoritative for example.com?
Answer and reasoning
It identifies the responding server for the query. The router might provide forwarding or recursion. Check the response flags, applicable delegation and known authorities to understand the role and the source of the answer.
What changes when you add a forced address mapping to a curl test?
Answer and reasoning
That invocation uses the mapped destination for the selected hostname and port instead of its ordinary name lookup. The URL can retain the intended hostname. The result helps test the named endpoint while leaving normal DNS for other clients untouched.
One lookup had type A and another had type AAAA. Their results differ. When would that be expected?
Answer and reasoning
A and AAAA request different address families. One may exist without the other, or both may carry deliberately different values. Compare the actual service requirements and supported family before declaring an error.
Cards for a DNS test report
Write the question exactly
Record name, type and resolver. Compare matching questions before interpreting different answers.
Full output explains blanks
Read status, counts, flags and useful authority context. A short response can omit the difference between two cases.
A received reply can be negative
A process exit is about the tool run. Its DNS status and RRs tell you whether the expected value appeared.
The trace follows its own route
A direct iterative diagnostic differs from a cached recursive query. Observe the supported path and write down any missing evidence.
A web test follows DNS
Use intended scheme, host, path and normal certificate checks. Report whether your probe used ordinary DNS or a controlled destination mapping.
Official references
- ISC dig query options, statuses and exit codes
- ISC host tool and type selection
- Microsoft nslookup options and result meanings
- Microsoft Resolve-DnsName options
- Amazon Linux 2023 package inventory
- Ubuntu BIND utility package listings
- DNS wire fields, flags and response sections
- Negative DNS responses and caching
- DNS support for TCP transport
- Reserved invalid and testing domains
- Curl controlled name-to-address mapping