What is DNS?

IP addresses are used to identify communicating hosts on the Internet; however, being a sequence of numbers, IP addresses are rather difficult for human users to remember. Therefore, each IP address is assigned an alphabetical domain name. Domain Name System (DNS) translates those domain names back to their corresponding IP addresses. DNS is an integral component of the Internet.

The process of finding out the IP address of any particular URL on the Internet is commonly referred to as DNS Lookup.

A simple DNS Lookup, also called a Forward Lookup, would work like this:

  1. You enter a URL into your browser’s address bar;
  2. The computer then sends a DNS request to your Internet Service Provider (ISP);
  3. ISP has DNS Service scan through the DNS databases in an effort to find the correct record that contains the data;
  4. If the record is located, IP address of the domain is returned to your computer;
  5. Your browser downloads the webpage and you can directly communicate with the server.

There also exists a reverse DNS Lookup, the process being the same, with the exception that it first starts out with an IP address that resolves into a domain name.

When DNS Service is unable to find what it is looking for or the process takes a while, we end up with “the webpage cannot be found” on our screens.

Query DNS Information

After a name server has been configured it’s crucial to check if the server performs properly. Various debugging software and tools are used to execute such checks and one of them is nslookup.

The nslookup program sends DNS queries to the DNS server and checks whether the server answers correctly. One of it’s advantages is that it’s part of the TCP/IP package in Windows, as well as UNIX, thus you won’t have to look for it anywhere.

In order to access nslookup, open a command line on your computer and use the command nslookup followed by the domain name or IP address that you want to resolve and press Enter.


nslookup webhostinggeeks.com


Non-authoritative answer:
name: webhostinggeeks.com

The first two lines, server and address, define the default name server in the system and its IP address.

The answer you need is in the next couple of lines. In the given example, a domain name was used, but it would work the same way with an IP address.

Using nslookup you can check the DNS records as well. The domain’s DNS records are stored in its DNS zone. All the information on domain names and their IP addresses together with all the rest of the information transferred via DNS is stored on the servers of name records called Resource Records (RR). Each resource record provides information about a specific object. A list of common type of records is given below:

  • Address Mapping records (A). A records assign IP addresses to domain names.
  • Canonical Name records (CNAME). CNAME records are used to create synonym domain names.
  • Host Information records (HINFO). HINFO records are information only. They contain information about hardware and software.
  • Mail Exchanger records (MX). MX records allocate the mailing server of the domain; they show to which computer a mail of a specific domain is sent.
  • Name Server records (NS). NS records designate authoritative name servers for a given host.
  • Reverse-lookup Pointer records (PTR). PTR records are used to resolve an IP address into a domain name.
  • Start of Authority records (SOA). SOA records establish primary name server, email of the domain administrator, serial number of the database file version and a few timers relevant to how often DNS zone is refreshed.
  • Text Records (TXT). Text records contain a general data string.

Requesting a Specific DNS Record using "nslookup"

By default nslookup is looking for an appropriate A or PTR record; however, it can also be used to request any resource record.

The type of record ought to be specified using the following command:

set querytype=type_of_a_record

or with the shortened version:

set q=type_of_record


set q=SOA


primary name server = ns1.digitalocean.com
responsible mail addr – hostmaster.webhostinggeeks.com
serial = 1502406197
refresh = 10800 <3 hours>
retry = 3600 <1 hour>
expire = 604800 <7 days>
default TIL = 1800 <30 mins>

In case you don’t know whether a specific domain name is a canonical name or an alias you can set the record type to any set q=any; in this case you’ll find out all records related to a specific domain. That is exctaly what our online tool does.