What the message looks like
$ dig example.com @ns1.example.net
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 41873
;; WARNING: recursion requested but not availableCommon causes
- The domain points (NS records at the registrar) to a name server that does not host the zone. This is a “lame delegation”, typical after a DNS migration or a cancelled hosting.
- You asked a recursive resolver from outside its allowed network, for example your office DNS from the internet.
- An access list (
allow-query,allow-recursion) or a firewall policy blocks your address. - The zone is not loaded or failed to load on the server, for example because of a syntax error.
- Transfers between name servers (AXFR) are refused. This is normal and intended for unknown hosts.
Check
- Which name servers does the domain use?
- Does each of them answer for the zone? (replace the name)
dig @ns1.example.net example.com SOA +norecurse - The full delegation path
dig +trace example.com - Does your own resolver answer?
dig example.com A +short
Fix
- If an authoritative server answers REFUSED for your zone, create or load the zone there, or remove that server from the NS records at the registrar.
- After a provider change update the NS records at the registrar to the new provider only, and keep the old zone active until the old TTL has passed.
- If it is your own resolver, allow your clients, for example in BIND
allow-recursion { 192.0.2.0/24; };. Do not open recursion to the whole internet, it is abused for amplification attacks. - On the server read the log for zone load errors (
journalctl -u namedor-u bind9) and runnamed-checkzoneon the zone file. - Retest from the failing client with
digdirectly against the server.
Typical scenario
You moved the domain to a new DNS provider, but the registrar still lists the old name server ns1.old-provider.example, where the zone was deleted. Some resolvers get REFUSED from it and cannot resolve the domain at times. Query the listed name servers one by one, for example with dig @ns1.old-provider.example SOA example.com +norec, and see which of them no longer knows the zone.
FAQ
What is the difference between REFUSED, SERVFAIL and NXDOMAIN?
NXDOMAIN: the name does not exist. SERVFAIL: the server tried and failed. REFUSED: the server will not answer you at all.
Why does only one of my name servers refuse?
Usually the zone exists on one but not on the other. Resolvers pick one name server per query, so the error appears only now and then.
Why do I use +norec when querying a name server directly?
Authoritative servers only answer for their own zones and do no recursion. If you ask with the recursion flag set, that can trigger a warning or a REFUSED that has nothing to do with the zone. With +norec the result is clear: the server knows the zone or it does not.
Can a REFUSED from a resolver be intentional?
Yes. Open resolvers get abused for amplification attacks, so operators restrict recursion to their own networks, for example with allow-recursion in BIND or access-control in Unbound. Anyone asking from outside then gets REFUSED. That is correct configuration, not an error.
How do I find which name server does not know the zone?
dig +nssearch example.com asks all name servers listed for the domain for the SOA record and shows each server's answer. A server with REFUSED or no answer is the candidate. dig +trace example.com additionally shows the delegation from the root, meaning what the registrar has entered.