Thursday, April 28, 2011

DNS: How to Dig thru the right domain name from the TLD?

I'd like to query the DNS records until get the right domain name.

For instance, given www.subdomain.site.com.br, be able to dig from .br until site.com.br.

Which is the most (protocol-speaking) way to achieve that? An recipe using dig/nslookup would be best.

Thanks.

From stackoverflow
  • dig +trace www.subdomain.site.com.br
    

    will show you exactly what happens.

    Clyde : This just times out for me (using a real domain name). Does this depend on your machine's DNS server being configured a certain way? Or does dig do all the work itself?
    David Zaslavsky : dig should do all the work itself, there's no special configuration required for the DNS server.
  • dig www.mysite.domain.com @a.root-servers.net
    

    you'll get the next level from there. Just replace the portion after the '@' and keep recursing until you query a server that gives an answer rather than additional information

    aldrinleal : Your answer gave-me the clue I was looking for. Thank you!

0 comments:

Post a Comment