About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
When dig shows status: REFUSED, the name server you asked returned DNS RCODE 5. RFC 1035 defines that code as:
Refused - The name server refuses to perform the specified operation for policy reasons. For example, a name server may not wish to provide the information to the particular requester, or a name server may not wish to perform a particular operation (e.g., zone transfer) for particular data.
REFUSED is not SERVFAIL, not NXDOMAIN, and not an empty NOERROR answer. The server spoke, and its policy said no.
What the symptom means
ISC KB aa-00503 states that allow-query governs who can send any query to the server, not only queries against authoritative data. If a query is blocked by that ACL, the response is empty (no records), with RCODE REFUSED. A query blocked by allow-query-cache is also REFUSED.
The defaults the KB lists when no values are set at all are:
allow-query { any; };
allow-query-cache { localhost; localnets; };
allow-recursion { localhost; localnets; };
The BIND 9 ARM says allow-query may also be set in a zone statement, and that if it is not specified the default is to allow queries from all hosts. allow-query-cache controls access to the cache and thus effectively controls recursion.
dig's common form is dig @server name type. Do not use +short when you need the status line.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
Client not in allow-query |
Empty answer, status: REFUSED |
Query from an allowed address succeeds; this address fails |
Client not in allow-query-cache on a recursive server |
REFUSED for recursive or cached lookups | KB: blocked by allow-query-cache → REFUSED |
Zone-level allow-query tighter than options |
Only some zones refuse | Same client, different zone name |
| You asked a server that is not willing to serve you | REFUSED from that @server |
Ask another listed nameserver |
| Wrong diagnosis as SERVFAIL or NXDOMAIN | Different status word in the header | Read status: without +short |
Prove the cause before changing anything
All of these are read-only.
1. Read the status in the verbose answer. The dig manual's form is:
dig @server name type
Replace server with the address or name of the server you are testing, name with the DNS name, and type with the record type (for example A). In the HEADER section, confirm status: REFUSED.
2. Ask from a second address. Repeat the same command from a host that should be inside the ACL. If that query is answered and yours is REFUSED, the policy is tied to the asker.
3. Compare authoritative and recursive paths. On a recursive server, REFUSED for internet names often points at allow-query-cache. On an authoritative-only server, inspect allow-query in options and in the zone.
4. Read the live named.conf without editing it. Find every allow-query and allow-query-cache line. Note whether the default allow-query { any; } was replaced with a narrower list.
Fix
Widen the ACL only for clients that should query this server. Opening allow-query { any; } on a recursive server that was locked down can expose resolver capacity to the internet.
Save a copy of the configuration file you are about to edit. Use the named.conf path your install actually loads (commonly under /etc or /usr/local/etc/namedb per the BIND ARM):
cp -a /etc/named.conf named.conf.before
If your primary configuration is a different path, copy that path instead to named.conf.before.
Risk: the next step edits named.conf and reloads named. A widened allow-query or allow-query-cache lets additional clients query this server. On a recursive resolver, unwanted internet clients can use your cache and recursion. A typing error in the ACL can refuse every client, including localhost, until you restore the saved file (expected behaviour of a broken ACL, not a cited-page statement).
Edit allow-query or allow-query-cache so the blocked client address or netblock is listed. Keep semicolon-separated address match elements, as the ARM describes. Then reload:
rndc reload
The rndc manual page states that reload reloads the configuration file and zones.
To undo it: copy the saved file back over the live named.conf path you edited, then run rndc reload again.
Example (illustrative): dig @192.0.2.53 example.net A from a desktop shows status: REFUSED; the same command on the nameserver returns the A record. named.conf has allow-query { 192.0.2.0/24; }; and the desktop is 203.0.113.10. After saving named.conf, adding the desktop netblock, and rndc reload, the desktop query succeeds. Restoring named.conf.before and reloading puts the old ACL back.
Confirm the fix
dig @server name typefrom the previously blocked client shows a status other than REFUSED.- A client that should still be denied still receives REFUSED.
rndc reloadcompleted after the edit; if reload fails, named is expected to keep the previous configuration until a successful reload.
What to watch afterwards
allow-query-cacheandallow-recursiondefault towardlocalhostandlocalnets. Allowing recursion for the world is a different decision from allowing authoritative answers.- Zone-level
allow-queryoverrides the options list for that zone. - REFUSED can also appear for zone transfer when policy denies it. The steps above are for ordinary query ACLs.
Read next
Related articles you may want next.
- Troubleshootingdig SERVFAIL, and it is not DNSSEC: the server does not answer for the zonedig returns SERVFAIL and DNSSEC is not the cause. Compare a direct query, dig +trace and dig +cd, then fix the server that does not answer for the zone.Read article
- Troubleshootingdig NXDOMAIN for a subdomain that should existdig returns NXDOMAIN for a subdomain you expected. Read the status without +short, ask the authoritative server, and check a cached name error before you add the record.Read article
- Troubleshootingdig NOERROR with an empty answer: the name exists, the type does notdig returns NOERROR and an empty answer. The name exists and the queried type does not. Tell NODATA from NXDOMAIN before you add a record.Read article
Risks and limits
- RFC 1035's definition is policy refusal in general. BIND's empty REFUSED answer for ACL misses is the concrete mechanism in ISC KB aa-00503.
- The dig manual does not print a sample REFUSED header. Trust the
status:field in the verbose reply. - These steps have not been lab-tested.
Sources
- RFC 1035: Domain Names - Implementation and Specification — IETF, November 1987, accessed 1 December 2026
- What's the difference between allow-query-cache and allow-recursion? — ISC, updated 12 October 2018 (published 23 May 2017), accessed 1 December 2026
- BIND 9 Configuration Reference: allow-query — ISC, no date shown, accessed 1 December 2026
- BIND 9 manual pages: dig and rndc — ISC, no date shown, accessed 1 December 2026
This article was originally published on .