• Main Menu
  • How to Perform a DNS Lookup


    DNS, Domain Name System, is a complex hierarchical system which helps map Internet addresses with their respective machines over the World Wide Web.

    When a domain is created and hosted, a variety of information is linked with it. DNS Lookup is generally a process of digging out this related information for a specified domain name. This set of information could include pieces like domain availability, IP addresses, name servers, expiration date, registration/creation date, owner of the domain, etc.

    There are multiple ways to perform a DNS Lookup.

    Online Tools

    Many websites provide online tools to lookup DNS information. To use most of these online tools, you simply have to enter a domain name and submit. The tool will then give you detailed DNS and related information for the entered domain name.

    Here are some of the DNS Lookup tools available online:

    NSLookup Command

    You can also perform DNS Lookup using the nslookup command. This command queries the Domain Name Service over the Internet to get related information. If you a pass domain name as a parameter to nslookup, you will get the corresponding IP address and vice-versa.

    The syntax for the nslookup command is as follows:

    nslookup [-opt …]             # interactive mode using default server
    nslookup [-opt …] – server    # interactive mode using ‘server’
    nslookup [-opt …] host        # just look up ‘host’ using default server
    nslookup [-opt …] host server # just look up ‘host’ using ‘server’

    Example: nslookup www.google.com

    Adding -type=mx parameter to the nslookup command will give you additional information.

    Example: nslookup -type=mx www.google.com

    NSLookup Command to perform DNS Lookup

    NSLookup Command to perform DNS Lookup

     

    IPConfig Command

    The ipconfig /displaydns command displays content of the DNS Resolver Cache. Which means that the command will show DNS information about all the websites you visited from the time cache was last cleared. DNS Lookup using this command will show pieces of information like Record Name, Record Type, Time to Live, Data Length, Section, PTR Record, and A-Host Record.

    The syntax for the ipconfig command is as follows: ipconfig /displaydns

    DNS Lookup using IPConfig DisplayDNS Command

    DNS Lookup using IPConfig DisplayDNS Command

     

    Host Command

    Host is another command in Linux to perform a DNS Lookup. It simply displays the mapped IP address for a domain/host name and vice-versa.

    Syntax: host www.example.com

    Reverse DNS Lookup

    DNS Lookup is commonly performed on a domain or host name. Reverse DNS Lookup, on the other hand, is a reverse process where you enter an IP address (and other criteria) and it gives you the domain/host name. It is possible that an IP address may have multiple domain names associated with it. Such a scenario normally occurs with people using shared hosting providers, where multiple websites are hosted on a shared IP address.

    The simplest way to perform a Reverse DNS Lookup is to use the ping command.

    ping –a <xxx.xxx.xxx.xxx>

    Similarly, you can also use the nslookup command with an IP address.

    nslookup <xxx.xxx.xxx.xxx>

    DNS Lookup is really helpful when you’re looking for information on a particular domain name for purchasing it, analyzing a potential competitor or tracking communication channel.

    Related Articles on DNS

    Got Something To Say:

    Your email address will not be published. Required fields are marked *

    Networking
    176 queries in 0.550 seconds.