Skip to content

Instantly share code, notes, and snippets.

@codfish
Created January 5, 2015 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codfish/004ffdf3d09fa7651d5d to your computer and use it in GitHub Desktop.
Save codfish/004ffdf3d09fa7651d5d to your computer and use it in GitHub Desktop.
Check DNS of a domain/subdomain to see if it's properly configured using whois & dig
# returns whois info for the domain, including name servers
whois codfish.io
# use dig to lookup any subdomain on a name server(s)
dig @ns-371.awsdns-46.com codly.codfish.io
# dig will output details of the lookup. If configured properly you should see
# the details in the ANSWER SECTION ... e.g.
;; ANSWER SECTION:
codly.codfish.io. 300 IN CNAME codly.herokuapp.com.
# subdomain that doesn't exist/resolve
# dig still returns details of the lookup, but there's no ANSWER SECTION
dig @ns-371.awsdns-46.com fake.codfish.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment