Skip to content
dnscheck.app

Glossary

DNSSEC Explained: What It Is, How It Works, Why It Fails

What is DNSSEC?

DNSSEC (DNS Security Extensions) lets a zone, the part of the DNS namespace one operator manages, sign its DNS data with a private key. The zone publishes the matching public key, so a validating resolver can check that an answer is authentic. DNSSEC provides origin authentication of DNS data, specified in RFC 4033, RFC 4034, RFC 4035 and RFC 6840. No other Standards Track method exists for this. A validating resolver with a valid trust anchor protects against spoofing even when its clients are not DNSSEC-aware.

How signing and the chain of trust work

The zone signs each RRset (a set of records with the same name and type) and publishes the public key as a DNSKEY. A resolver starts from a trust anchor, a configured public key or its hash. It checks the domain's key at the TLD, then the TLD's key at the root. A zone without the required records is unsigned.

Record Where it lives What it does
DNSKEY In the zone Holds the public key.
RRSIG In the zone Carries the signature over an RRset, its validity interval, and the identifiers of the key.
DS In the parent zone Holds a hash of the child's DNSKEY and links the chain across the delegation.
NSEC/NSEC3 In the zone Signed records that can prove no DS exists. NSEC3 is as much part of DNSSEC as NSEC.

Why DNSSEC validation fails

When a validating resolver cannot verify any signature, it returns SERVFAIL (RCODE 2, the "server failure" response code). This state is called Bogus. Bogus may indicate an attack, but it may equally be a configuration error or data corruption. Some failures persist, such as a zone that was not re-signed, and requerying does not help.

Common causes:

  • The DS at the registrar does not match the DNSKEY the DNS host publishes, typically after changing DNS provider without updating or removing the old DS.
  • Signatures expired because the zone was not re-signed.
  • The resolver does not support the zone's algorithm. A resolver that supports none of the DS algorithms should treat the zone as unsigned.
  • DNSKEY records were removed while the DS is still published.

To test, run both queries and read the flags and status lines:

dig example.com A +dnssec
dig example.com A +cd
;; ->>HEADER<<- opcode: QUERY, status: NOERROR
;; flags: qr rd ra ad;

A set ad flag means the response was validated. An unset ad is ambiguous: validation may not have been attempted, or it may have failed. With +cd, a response comes back whether or not validation succeeded. A good answer with +cd but SERVFAIL without it usually points to a DNSSEC misconfiguration, often a DS mismatch after a nameserver change. Test your domain's DNSSEC, check which nameservers your domain uses, and look up DNSKEY and DS records.

To turn DNSSEC off, note your current records first. Remove the DS at the registrar, then wait at least 1.5 times its TTL before removing the DNSKEY records. Removing DNSKEY while DNSSEC is still enabled breaks resolution.

Should you enable DNSSEC?

It is a trade-off. DNSSEC is the best current practice for origin authentication of DNS data. It also adds complexity, which creates room for implementation bugs and misconfigured zones. A mistake can make the domain fail for validating resolvers.

Enabling has two parts. The DNS host signs the zone and publishes the DNSKEY. The DS is then added at the registrar, so a resolver should believe the zone is signed because the parent is signed and the delegation contains a DS. Steps differ by provider, so follow your DNS host's and registrar's documentation.

A stub resolver does no validation itself and depends on its recursive servers.

References