The question doesn't say exactly what the answer looks like, but I suspect that you are misinterpreting what you see rather than not getting an authoritative answer (which is indeed expected).
(If that is not the case, I would suspect that you are doing your tests in an environment where DNS queries are intercepted and sent to a local resolver instead of the nameserver at the destination address, or something like that.)
I get this answer, which is just like what one would expect:
$ dig @ns-cloud-d1.googledomains.com. offensivelearning.com NS +norec
; <<>> DiG 9.18.8 <<>> @ns-cloud-d1.googledomains.com. offensivelearning.com NS +norec
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65042
;; flags: qr aa; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;offensivelearning.com. IN NS
;; ANSWER SECTION:
offensivelearning.com. 21600 IN NS ns-cloud-d3.googledomains.com.
offensivelearning.com. 21600 IN NS ns-cloud-d1.googledomains.com.
offensivelearning.com. 21600 IN NS ns-cloud-d2.googledomains.com.
offensivelearning.com. 21600 IN NS ns-cloud-d4.googledomains.com.
;; Query time: 14 msec
;; SERVER: 2001:4860:4802:32::6d#53(ns-cloud-d1.googledomains.com.) (UDP)
;; WHEN: Sun Jan 22 14:24:56 UTC 2023
;; MSG SIZE rcvd: 168
$
Note the aa
flag (authoritative answer).
SOA
in theAUTHORITY
section of your first query, and no ANSWER, because there are noA
records at apex (try doing a query for AAAA or for any other record types without records, same answer), but the server helps with theSOA
as its last value is called the "Negative TTL" and informs the client for how long to keep the information (that the record does not exists). For records existing the info is in the TTL part of the record returned itself. Note that you get aNOERROR
where for the same query of a name below, likefoobar
you will getNXDOMAIN
(and still a SOA)