DNS

Resolving domain names with dig

Submitted by till (Contact Author) (Forums) on Mon, 2006-08-07 16:09. :: DNS

To resolve a domain name on the shell, you can use the command dig. Resolving the domain example.com:

dig example.com

If thedomain can be resolved, the result will be similar to this:

;  DiG 9.2.1  howtoforge.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42946
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;example.com. IN A

;; ANSWER SECTION:
example.com. 84600 IN A 192.168.0.1

;; Query time: 27 msec
;; SERVER: 212.227.21.251#53(212.227.21.251)
;; WHEN: Wed Oct 26 18:53:32 2005
;; MSG SIZE rcvd: 48

To check if the local webserver is responsible for this domain use the following command:

XML feed
"Facebook" is a registered trademark of Facebook, Inc. All rights reserved.