dig returns status: SERVFAIL, many people assume the domain is down. They suspect crashed nameservers, a suspended hosting account, or a zone the registrar dropped. Often none of that is true. The authoritative servers are up and answering normally, but the resolver you asked checked the zone's DNSSEC signatures, found a problem, and refused to pass the answer on. One extra flag on dig tells you which of these situations you are in.
Why "SERVFAIL means down" falls apart
.com publishes for your domain, and ends at the DNSKEY records inside your zone. If any link in that chain fails, the resolver treats the answer as "bogus". It returns SERVFAIL so that it never hands out data that might be forged.
This behavior protects users from forged answers. It also makes the symptom inconsistent. Resolvers that validate fail the lookup, while resolvers that skip validation keep answering. A site can load on one network and fail on another, so customers often report that it works on mobile data but not on the office Wi-Fi. When a support engineer sees that pattern alongside SERVFAIL, DNSSEC is one of the first things worth ruling out.
What usually breaks the chain
Compare dig with and without +cd
+cd flag sets the CD (Checking Disabled) bit in the query, as defined in RFC 4035. It asks the resolver to return the data without validating it. If the plain query fails and the +cd query succeeds, the data is reachable and validation is the thing failing. Cloudflare's DNSSEC troubleshooting docs describe the same test: if +cd returns NOERROR with real addresses, DNSSEC is misconfigured.
Run both queries against a resolver you know validates:
BASH
# Normal query: the resolver validates DNSSEC
dig @1.1.1.1 example.com A
# Same query with validation disabled
dig @1.1.1.1 example.com A +cdTEXT
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 1111
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
; EDE: 7 (Signature Expired)
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2222
;; flags: qr rd ra cd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; ANSWER SECTION:
example.com. 300 IN A 192.0.2.10+cd query. Newer versions of dig show the EDE line when the resolver supports Extended DNS Errors (RFC 8914). EDE codes such as Signature Expired, DNSSEC Bogus, or DNSKEY Missing point you toward the cause. Older dig versions and some resolvers do not show this line, so don't rely on it being there.
Keep these limits of the test in mind:
- If the resolver does not validate, both queries succeed and the comparison tells you nothing. Test against a resolver you know validates.
- If
+cdalso returns SERVFAIL or times out, the problem is probably not DNSSEC. Move on to the delegation and the authoritative servers. Tracing the authoritative path with dig +trace covers that path. - A
+cdsuccess shows that validation is failing. It does not show which link failed, so you still need to check the signatures and the DS record.
Read RRSIG expiry and compare DS with DNSKEY
ns1.example.net with one of the domain's real nameservers. dig example.com NS +short lists them.
BASH
# Signatures as served by the authoritative server
dig @ns1.example.net example.com A +dnssec +norec +multi
# DS at the parent, as a resolver sees it
dig example.com DS +short
# Keys in the zone; +multi prints a key id comment for each key
dig @ns1.example.net example.com DNSKEY +norec +multiYYYYMMDDHHMMSS in UTC. Compare the expiration timestamp with the current UTC time (date -u). If the expiration is in the past, you have found the problem. If it is only a few hours away and the zone has not been re-signed recently, the signer has probably stopped and the zone is about to fail.
For the DS check, the output of dig DS +short starts with the key tag, followed by the algorithm, the digest type, and the digest. In the DNSKEY output, +multi labels each key with a comment such as KSK and key id. The DS key tag should match the key id of a KSK, which is a DNSKEY with flags 257, and the algorithm numbers should match too. If the DS points to a key id that no longer exists in the zone, the chain is broken at the parent.
If you have the BIND utilities installed, delv performs validation locally and usually states the reason for a failure more directly than dig does. The exact wording of its messages varies between versions.
Fix it without making things worse
- Remove the DS record at the registrar.
- Wait at least the DS TTL so resolvers drop the cached DS.
- Switch the nameservers to the new provider.
- Turn on signing at the new provider.
- Publish the new provider's DS record at the registrar.
+cd before concluding the domain is down. If +cd works, the servers are fine and validation is failing. Then read the RRSIG timestamps from an authoritative server and compare the DS key tag against the zone's KSK. That usually tells you within a few minutes whether the cause is an expired signature or a stale DS record, and which side of the registrar boundary has to fix it.