Error fix · Developer errors

dig "status: REFUSED": Why a DNS Server Declines Your Query

dig shows status REFUSED when a DNS server will not answer: wrong server for the zone, recursion not allowed, or an ACL. Learn how to tell which and fix it.

Error message;; ->>HEADER<<- opcode: QUERY, status: REFUSED

By SiteDownCheck Editorial · Updated November 18, 2026 · 4 min read

You run dig and the header says:

;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 29404
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

REFUSED is DNS response code 5. The server is up, received your question, understood it, and chose not to answer. That is different from a timeout (no reply at all), from NXDOMAIN (the name does not exist) and from SERVFAIL (the server tried and failed). The side-by-side comparison is in NXDOMAIN vs SERVFAIL vs REFUSED.

Look at the flags line. In the example, ra (recursion available) is missing from the reply, and aa (authoritative answer) is missing too. Those two flags usually tell you which of the cases below applies.

Case 1: you asked an authoritative server about a zone it does not host

This is the most common REFUSED for domain owners. An authoritative-only server answers for the zones loaded into it. Ask it about any other name and it refuses.

dig example.com A @ns1.old-provider.net

Causes:

  • You moved DNS to a new provider but the registrar still lists the old nameservers, or the reverse. See change nameservers without downtime.
  • The zone was deleted at the old provider after the move.
  • The zone exists but was not loaded because of a syntax error. Check named-checkzone example.com /var/named/example.com.zone on BIND, or the provider's dashboard.
  • The zone was never created at the provider you delegated to.

When the registry points to servers that refuse your zone, visitors see intermittent failures depending on which nameserver a resolver tries. That is the pattern described in lame delegation. Compare what the registry says (dig example.com NS @a.gtld-servers.net +norecurse for a .com domain) with what the zone says.

Case 2: you asked a recursive resolver that does not serve you

Resolvers run by ISPs, companies or cloud providers often only answer clients on their own networks. From outside, the response is REFUSED.

dig example.com A @203.0.113.53

On BIND this is controlled by allow-recursion and allow-query; on Unbound by access-control; on dnsmasq and Pi-hole by interface and listening settings. Restricting recursion is intentional: open recursive resolvers are abused in reflection and amplification attacks. If you are the operator, add your client networks to the allowed list:

  # BIND options example
allow-recursion { 127.0.0.1; 192.168.0.0/16; };

Reload and test from the client. If you are only a user, use a different resolver.

Case 3: you are asking a recursive question to a server that only does authoritative service

dig sets the rd (recursion desired) bit by default. Authoritative-only servers may refuse recursive queries from strangers. If you want a plain authoritative answer, use +norecurse:

dig example.com A @ns1.provider.com +norecurse

A properly hosted zone returns NOERROR with the aa flag set. REFUSED here, with +norecurse, means the zone is not served by that server (Case 1).

Case 4: zone transfers

dig example.com AXFR @ns1.example.com
; Transfer failed.

Refusing AXFR to the public is the correct, secure default. Zone transfers are limited to configured secondaries with allow-transfer in BIND (and often TSIG keys). This is not an outage and should not be "fixed" by opening transfers to everyone. Verify only from an authorized secondary.

Case 5: query-specific policy

Some servers refuse certain query types, like ANY (many operators answer minimally or refuse it), version queries such as dig CH TXT version.bind (blocked deliberately), or requests from IPs on a blocklist or rate-limited by response rate limiting. If only a particular query type is refused, this is the cause. Try A or NS instead.

Triage order

  1. Is the server you queried meant to be authoritative, a recursive resolver, or both?
  2. Re-run with +norecurse against the nameservers listed by dig NS.
  3. Check that the same SOA serial and the aa flag appear from every listed nameserver.
  4. Compare registry delegation to the zone's own NS records.
  5. If you operate the server, read its log for "query denied" or "zone not loaded" entries.

How to verify

Query every nameserver listed for the domain and confirm NOERROR with aa set and matching serials. Use the Nameserver Lookup for the delegation view and the DNS Checker to confirm resolvers around the world return the right answer. If you run your own servers, check that UDP and TCP 53 are reachable; the Port Checker covers TCP. DNS History shows whether the nameserver set changed recently, and an Uptime Monitor with DNS-change alerts reports future changes.

Next steps

FAQ

Is REFUSED the same as a firewall block?

No. A firewall drops packets and you get a timeout. REFUSED is a real DNS reply that says the server will not answer that query.

Why do I get REFUSED from my own nameserver?

Most likely the zone is not loaded on it, or you used a recursive query against an authoritative-only server. Retry with +norecurse and check the zone.

Should I allow zone transfers to fix it?

No. Allow them only to your own secondary servers. A refused AXFR from the public internet is normal.

Can REFUSED affect my website visitors?

Yes, if some of your listed nameservers refuse the zone. Resolvers that choose them get no answer and may retry elsewhere, causing slow or intermittent resolution.

Get notified when this fix updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.