Find the DNS Authority Record for a DNS Domain (SOA)

To find the DNS authority record for a domain, you need to perform a DNS lookup for the Start of Authority (SOA) record. The SOA record provides information about the domain’s primary name server, the email address of the responsible party for the domain, and other administrative information.

You can use the dig command to retrieve the SOA record for a domain. Here is the syntax of the command:

dig +nssearch example.com SOA

In this command, replace example.com with the domain name that you want to look up. The +nssearch option tells dig to search for authoritative servers only, and the SOA parameter specifies that you want to retrieve the SOA record.

Here is an example output:

; <<>> DiG 9.10.3-P4-Ubuntu <<>> +nssearch example.com SOA
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47514
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 5

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 9266a3a6d3e2f647f128bb7a602a77197b1e746d
;; QUESTION SECTION:
;example.com. IN SOA

;; ANSWER SECTION:
example.com. 3600 IN SOA ns1.example.com. hostmaster.example.com. 2019050202 3600 7200 1209600 86400

;; AUTHORITY SECTION:
example.com. 172800 IN NS ns2.example.com.
example.com. 172800 IN NS ns1.example.com.

;; ADDITIONAL SECTION:
ns1.example.com. 86400 IN A 192.0.2.1
ns2.example.com. 86400 IN A 198.51.100.1

;; Query time: 36 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Fri Feb 19 21:11:50 UTC 2023
;; MSG SIZE rcvd: 187

In this output, you can see the SOA record in the ANSWER SECTION. The NS records in the AUTHORITY SECTION indicate the authoritative name servers for the domain.

Leave a Comment