dig status: REFUSED — Fix Recursion Denied and Not Authoritative
dig status: REFUSED means the server declined by policy. You asked an authoritative-only server about another zone, or you're outside the resolver's ACL.
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 41407;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1;; WARNING: recursion requested but not available…; EDE: 18 (Prohibited)status: REFUSED means the server is up and received the query but will not answer it by policy. There are two usual causes: you asked an authoritative server that doesn't recurse about a name outside its zones, or you queried a recursive server from an address outside its allow list (BIND allow-recursion, Unbound access-control). Point the client at a proper resolver, or add the client network to the resolver's allow list. This is a different situation from getting no answer at all (timed out, connection refused) — for that, see Temporary failure in name resolution.
[1] Read the two header lines and the EDE: line to pick the branch. If flags has no ra (recursion available) and you see WARNING: recursion requested but not available, that server will not recurse for you.
| What you see | Meaning | Go to |
|---|---|---|
EDE: 20 (Not Authoritative) | You asked an authoritative server about a zone it doesn't serve | [2] |
EDE: 18 (Prohibited) | An access control list blocked you | [3] |
No EDE, QUERY: 0 | Unbound's default refusal, among others | [4] |
Not every server adds EDE (Extended DNS Errors, RFC 8914). When it's missing, first find out what kind of server the address in the SERVER: line is.
[2] Check whether you asked an authoritative server about someone else's name. Here the public authoritative server a.iana-servers.net (which holds the example.com zone) is asked about another domain:
$ dig @a.iana-servers.net www.google.com A…;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 40322;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1;; WARNING: recursion requested but not available…; EDE: 20 (Not Authoritative)Ask the same server about its own zone and you get NOERROR with aa (authoritative answer):
$ dig @a.iana-servers.net example.com SOA +norecurse…;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18177;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1BIND 9.18 with recursion no; behaved the same way in testing (own zone NOERROR aa, other zones REFUSED). In this branch you fix the client, not the server.
- If
/etc/resolv.confor the app's DNS setting points at an authoritative server (an internal zone server, your DNS provider's nameserver), change it to a recursive resolver. - If you queried your DNS provider's nameserver to check your own domain and got
REFUSED, the zone doesn't exist at that provider or the domain is spelled differently there. Compare the nameservers at the registrar with the zone name at the provider.
[3] On a recursive server, check whether access control blocked you. This BIND only allows recursion from 127.0.0.1. A query from another address was refused with EDE: 18, while the server's own zone (www.example.com) still answered NOERROR from that address — only recursion is blocked.
acl trusted { 127.0.0.1; };options { recursion yes; allow-recursion { trusted; };};The server log names the list that matched:
27-Oct-2026 08:09:54.009 client @0x70d9c13322e8 192.0.2.10#35097 (isc.org): query (cache) 'isc.org/A/IN' denied (allow-query-cache did not match)The log says allow-query-cache even though the config sets allow-recursion. Per the BIND reference, allow-query-cache defaults to the value of allow-recursion. If you set neither, the default is localnets; localhost; — only subnets the server has an interface on. Clients on a VPN, another Docker network, or another office network get REFUSED even though nobody configured anything.
Add only the network that needs access:
acl trusted { 127.0.0.1; localnets; 198.51.100.0/24; };$ sudo named-checkconf$ sudo rndc reconfig[4] On Unbound, check access-control. Per the Unbound docs, only 127.0.0.0/8 is allowed by default and everything else is refused. This is an Unbound with no access settings, queried from another address:
$ dig -p 5300 @192.0.2.10 isc.org A…;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 42009;; flags: qr rd ad; QUERY: 0, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0;; WARNING: recursion requested but not availableUnlike BIND, it returns no EDE and not even the question (QUERY: 0). Adding the client network with allow, checking syntax with unbound-checkconf, and reloading gave NOERROR.
server: access-control: 192.0.2.0/24 allow$ unbound-checkconf /etc/unbound/unbound.confunbound-checkconf: no errors in /etc/unbound/unbound.conf$ sudo unbound-control reloadIf you opened the wrong range, delete the added access.conf or change that line to refuse, run unbound-checkconf again, then sudo unbound-control reload. The change lives in that one new file, so removing it restores the previous state.
The docs say allow is for recursive clients and non-recursive queries are refused. In testing, dig +norecurse was still REFUSED after the network was allowed. If you added +norecurse while debugging, drop it and ask again.
[5] After the fix, query again from the affected client and check that ra appears in flags. If you now get NOERROR with an empty answer, or SERVFAIL, access is no longer the problem — the name is. For SERVFAIL, continue with dig SERVFAIL and DNSSEC.
If a REFUSED answer still carries ad, see dig ad and cd flags.
Check it with the dig output explainer tool ↗ — calculated in your browser.