DIG WARNING: recursion requested but not available


You may get a warning when trying to query with dig, WARNING: recursion requested but not available.

; <<>> DiG 9.16.37-Debian <<>> domain.tld
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: FORMERR, id: 34429
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

which does dig recursion requested?

DIG sends DNS COOKIE option, this option is enabled by default starting with BIND 9.11. Unfortunately. The query with this option means that the DNS server, often older Windows DNS servers. Treats the request as incorrect, or does not understand the query, which means that the request is rejected.

A workaround can be to pass the+nocookieor+noedns to disable the EDNS option.

$ dig domain.tld +nocookie

The message recursion requested appear, but the dig request is resolved.

dig commands return one or multiple sections of information about the hostname’s DNS records depending on the syntax of your query. In the example below, dig returned results for the query dig time.google.com +nocookie

$ dig time.google.com +nocookie

; <<>> DiG 9.18.12-0ubuntu0.22.04.2-Ubuntu <<>> time.google.com +nocookie
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31915
;; flags: qr rd ad; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;time.google.com.               IN      A

time.google.com.        0       IN      A
time.google.com.        0       IN      A
time.google.com.        0       IN      A
time.google.com.        0       IN      A

;; Query time: 9 msec
;; WHEN: Sun Aug 06 13:02:12 CEST 2023
;; MSG SIZE  rcvd: 112
dig recursion requested but not available

what is dig?

dig is a robust command-line tool developed by BIND for querying DNS nameservers. It can identify IP address records, record the query route as it obtains answers from an authoritative nameserver. Using Diagnostic and other DNS issues. Use with or without EDNS option for recursion requested.

You can install dig on most operating systems by downloading the latest version of BIND 9 from BIND’s website. And from the command line using a package manager.

Installing dig

To install dig for Windows, go to BIND’s website and download the most current version of BIND 9. Extract the downloaded file and double-click the BIND install icon in the newly created directory.

On the BIND 9 Installer screen, verify that the target directory is set to C:\Program Files\ISC BIND 9 (or C:\Program Files (x86)\ISC BIND 9 if you are using an x86 architecture) and select the Tools Only check box. Then click Install.

Dig is a part of DNS utility package that often gets installed with BIND name servers. You can also install the utility package on Debian Linux that contains dig with ran apt-get install dnsutils

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a Reply

Your email address will not be published. Required fields are marked *