How to dig a domain using a specific DNS
How to dig a domain using a specific DNS server.
You can dig a domain using a specific DNS server by adding the
@ [DNS server]
after the
dig
command. By default,
dig
will use the local configuration if the DNS is not specified.
For example, the following command will specify digging the
example.com
domain using Google's DNS server
8.8.8.8
:
dig @8.8.8.8 example.com
The result is:
C: \Users \asus>dig @8.8.8.8 example.com
; <‹>> DiG 9.16.33 <‹>> @8.8.8.8 example.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -››HEADER<< - opcode: QUERY, status: NOERROR, id: 19649
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;example.com. IN A
;; ANSWER SECTION:
example.com. 75315 IN A 93.184.216.34
;; AUTHORITY SECTION:
example.com. 75315 IN NS a.iana-servers.net
example.com. 75315 IN NS b.iana-servers.net
;; ADDITIONAL SECTION:
example.com. 75315 IN AAAA 2001:500:8f::53
example.com. 89883 IN AAAA 2001:500:8d::53
;; Query time: 15 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sun Oct 23 20:57:57 SE Asia Standard Time 2022
;; MSG SIZE revd: 160