What's DNS?Among those who don't work with the technical aspects of the Internet, there's sometimes a common, pervading confusion about exactly what DNS actually does. It's surprising that a relatively innocuous three-letter acronym can be responsible for such perplexity and puzzlement when in reality, its job is a truly simple one.
It might be said that DNS makes the Internet more human friendly than computer friendly. That's because the vast majority of DNS lookups simply convert either a name to a number, or a number to a name. Contrary to popular belief it's really that straight forward.
The Domain Name System in ActionLet's start with the basics and simply concoct an example using a Web browser that is asked to visit www.techopedia.com.
Since computers work best with numbers (they use ones and zeros in the binary computing language), a DNS lookup is performed on the computer upon which the browser is running. The results of that query are that www.techopedia.com is converted to an IP address, in this case an IP address that belongs to Amazon Web Services: 126.96.36.199.
That's called a forward DNS lookup. Conversely, a reverse DNS lookup is the just the opposite, and occurs when an IP address is converted to a name, or 188.8.131.52 becomes www.techopedia.com.
There are various reasons why this conversion is needed, but both these types of queries are important.
To say that DNS is key to the Internet is understating the obvious. Without it, very few services operate at all, never mind partially. Even those services running in the background that should probably function without correctly functioning DNS are often in a poor state of misconfiguration and fail anyway. What this means is that we rely on DNS for everything from email to video, to Twitter and Facebook.
The sheer numbers of DNS lookups in any given day are mind blowing. Google launched its own DNS resolver service in 2009. By 2012, it had served more than 70 billion requests.
That kind of volume shows just how useful a DNS resolver is in performing reliable DNS lookups for free without the need to run your own name servers. In fact, most Internet service providers (ISPs) provide Internet users with name servers, which may be the DNS resolvers you're using right now.
DNS: The Big PictureLet's take a step back and look at the bigger picture briefly. The hierarchy that allows a DNS query to be answered is quite simple.
Trusted institutions (such as government bodies, NASA, ISPs and universities) are responsible for certain top-level domain names such as .com or .biz. When your browser sends its initial request for a domain name's IP address, the query is first sent to what's called a root server.
These root servers know which name servers (and which ISPs) correlate to the requested domain name and, they pass the query to them for an answer. Through anything from a few to several traversed name servers later, the browser is then given the answer it's looking for (hopefully), and can then connect to the IP address it has been given.
Check out the DNS records for Techopedia here. Part of this is shown below.
Common LookupsThere are many different types of DNS records, but for our purposes the two we're interested in are those needed for websites and email.
The A record is a simple announcement. It states that a particular hostname, or in other words a DNS name, points at one or more IP addresses.
It might be declared on a name server as shown below, where the "www" record points to the IP address 184.108.40.206:
IN A www.techopedia.com 220.127.116.11
In order to send email to a domain name you would announce what's called a mail exchanger record (abbreviated to MX), like so:
IN MX mail.techopedia.com 18.104.22.168
Here the hostname "mail" points at an IP address and should accept email for that domain name. (Learn about other common DNS records in 12 DNS Records Explained.)