owasp-amass/amass · info · ErrNameDoesNotExist
name does not exist
Error message
name does not exist
What it means
ErrNameDoesNotExist is a sentinel error returned by the DNS resolution pipeline (dnsQuery and PerformQuery) in engine/plugins/support/resolvers.go when an authoritative DNS server answers with RcodeNameError (NXDOMAIN). It signals the queried domain name simply does not exist in DNS, so no further record lookups for it can succeed. PerformQuery propagates it (together with ErrNoRecordOfThisType) so callers can distinguish NXDOMAIN from transient lookup failures.
Source
Thrown at engine/plugins/support/resolvers.go:26
"context"
"errors"
"runtime"
"strings"
"time"
"github.com/miekg/dns"
"github.com/owasp-amass/resolve/conn"
"github.com/owasp-amass/resolve/pool"
"github.com/owasp-amass/resolve/selectors"
"github.com/owasp-amass/resolve/servers"
"github.com/owasp-amass/resolve/types"
"github.com/owasp-amass/resolve/utils"
"github.com/owasp-amass/resolve/wildcards"
"golang.org/x/net/publicsuffix"
)
var (
ErrNameDoesNotExist = errors.New("name does not exist")
ErrNoRecordOfThisType = errors.New("no record of this type")
ErrFailedMaxDNSAttempts = errors.New("failed the maximum number of DNS attempts")
)
type baseline struct {
address string
qps int
}
// baselineResolvers is a list of trusted public DNS resolvers.
var baselineResolvers = []baseline{
{"8.8.8.8", 5}, // Google Primary
// {"8.8.4.4", 5}, // Google Secondary
{"95.85.95.85", 2}, // Gcore DNS Primary
{"2.56.220.2", 2}, // Gcore DNS Secondary
{"76.76.2.0", 2}, // ControlD Primary
{"76.76.10.0", 2}, // ControlD Secondary
{"9.9.9.9", 2}, // Quad9 PrimaryView on GitHub (pinned to 79299dce87)
Solutions
- Treat the name as non-existent: skip it and do not retry, since NXDOMAIN may be cached.
- Check the name for typos or stale data before re-adding it to the enumeration queue.
- Use errors.Is/== against support.ErrNameDoesNotExist to branch on this case instead of generic error handling.
- If the name should exist, verify with an external resolver/dig and check for DNS propagation or zone misconfiguration.
Example fix
// before
resp, err := support.PerformQuery(ctx, name, dns.TypeA)
if err != nil {
log.Error(err.Error())
}
// after
resp, err := support.PerformQuery(ctx, name, dns.TypeA)
if err != nil {
if err == support.ErrNameDoesNotExist {
log.Info("name does not exist, skipping", "name", name)
return nil
}
log.Error(err.Error())
} Defensive patterns
Strategy: try-catch
Validate before calling
// Go: check name plausibility before querying
if name == "" || !strings.Contains(name, ".") {
return fmt.Errorf("invalid name %q", name)
} Type guard
func isNameDoesNotExist(err error) bool { return errors.Is(err, support.ErrNameDoesNotExist) } Try / catch
rr, err := support.PerformQuery(ctx, name, dns.TypeA)
if err != nil {
switch {
case errors.Is(err, support.ErrNameDoesNotExist):
return nil // definitive: skip
default:
return err
}
} Prevention
- Skip NXDOMAIN names permanently instead of requeueing them.
- Validate hostnames before submitting them for resolution.
- Distinguish NXDOMAIN from transient errors using the sentinel errors.
- Remember NXDOMAIN can be cached by resolvers — do not hammer retries.
When it happens
Trigger: Calling support.PerformQuery(ctx, name, qtype) (or the internal dnsQuery) for a name whose DNS response has Rcode == dns.RcodeNameError, e.g. a subdomain that was never registered or has been deleted.
Common situations: Enumerating subdomains of a zone and hitting a non-existent host; a domain expired or was removed between discovery and resolution; typo in the hostname being resolved; wildcard-based discovery emitting names that do not resolve.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- no record of this type
- no resolver keys were found in the resolvers section
- brute forcing cannot be performed without DNS resolution
- active enumeration cannot be performed without DNS resolutio
- no valid resolvers were found
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/2cacac50ca2ccd32.
Report an issue: GitHub.