Pages Menu
Categories Menu

DNS

DNS (Domain Name Server)

DNS name resolution is nothing but resolving host names, such as www.serversitters.com, to it’s corresponding IP addresses. DNS works as the “phone book” for the Internet by translating hostname into IP address or vise versa. Most DNS servers store the following information:

 

  • Hostname and their IP address
  • List of mail server and their IP address for given domain name
  • Anti spam configuration and much more.

 

Without DNS name resolution, nothing will work on the Internet.

IP Addresses

The Internet Protocol (IP) is the method or protocol by which data is sent from one computer to another on the Internet. Each computer (known as a host) on the Internet has at least one IP address that uniquely identifies it from all other computers on the Internet.

This ip address number is an exclusive number all information technology devices (printers, routers, modems, computers, and web hosting providers server’s) use which identifies and allows them the ability to communicate with each other on a computer network.

 

How does DNS work? DNS Flow Chart

So, when you purchase a domain name from a name registrar, the registrar will associate with that domain name a minimum of two DNS name servers. These DNS name servers are configured and maintained by the company that hosts your web site for you – not the domain name register. However, the name registrar does send the DNS name server information that you provide at the time of purchase to InterNIC for storage in the root servers that make up the Domain Name System.

The role of the DNS name servers maintained by your hosting company is to respond to a query for a specific domain name with the precise location on the exact web hosting server (using that server’s IP address) where that domain name, and thus web site, is located. The role of the root servers that make up the Domain Name System of the World Wide Web is to send an ISP’s equipment, and thus the web browser, to the correct DNS name server that will in turn point to the web site being requested.

With this system, web site users only need to know your domain name to find your web site, it does not matter to them what the IP address is for the individual server on which your site is housed.

So basically here is what happens:

 

  • I log onto my Internet Service Provider (ISP) to use the Web.
  • I open my web browsing software (i.e. Google Chrome or Mozilla Firefox) and type http://www.serversitters.com into the location bar.
  • My computer asks my ISP’s DNS server(s) for the IP address of www.serversitters.com.
  • My ISP’s equipment first checks its memory cache to find out if it has fulfilled a request for this same address recently.
  • If it has not, my ISP’s equipment will communicate with InterNIC’s conglomeration of root servers that make up the Domain Name System to find out which DNS server holds the IP address of the domain name.
  • My ISP’s equipment takes the address provided and sends a query to the authoritative DNS server for that domain.
  • The authoritative DNS server responds with the IP address of the desired server.
  • My ISP’s equipment updates its memory cache with the address so that it will respond to future requests without all the steps above.
  • My ISP’s equipment responds to my computer with the IP address of the server for which I am looking.
  • My computer updates its memory cache so that it doesn’t have to look up the address for a while.
  • My computer hands the address to my browser, which opens a connection to the server (using the specified IP address) and retrieves the first page from the site I requested.
  • My browser displays the requested page on my screen.

 

What are DNS Records ?

DNS records or Zone files are used for mapping URLs to an IPs. Located on servers called the DNS servers, these records are typically the connection of your website with the outside world. Requests for your website are forwarded to your DNS servers and then get pointed to the web servers that serve the website or to Email servers that handle the incoming email.

 

Types of DNS Records

 

  • A – Are required to point to an IP Address and are mostly used in pointing website pages, domains sub-domains etc.
  • CNAME – A CNAME record or canonical name record makes one domain name an alias of another. You should use a CNAME record whenever you want associate a new subdomain to an already existing A record. This allows you to have as many subdomains as you wish without having to specify the IP for every record. Use a CNAME if you have more services pointing to the same IP. This way you will have to update only one record in the convenience of a change of IP address. Example of a CNAME record: “stuff.everybox.com CNAME www.everybox.com” where ‘www.everybox.com’ is an A record listing an IP address, and ‘stuff.everybox.com’ points to ‘www.everybox.com’. It will NOT allow you to forward a domain to a specific web page.
  • MX – maps a domain name to a list of mail exchange servers for that domain. Another words where to look for mail for this domain.
  • NS – These records indicate which name servers are authoritative for the zone / domain. NS records are primarily used if you want to break your domain into subdomains. Subdomains indicate you are delegating a portion of a domain name to a different group of name servers, thus creating NS records to point the name of the subdomain to different name servers.
  • SOA – Start of Authority record is one that every domain requires. An example of an SOA record would be :

(bowseranana.com     SOA                hot.stormyartzdesign.com)

The SOA record includes the following details:

  • The primary name server for the domain, which is hot.stormyartzdesign.com or the first name server in the vanity name server list for vanity name servers.
  • The responsible party for the domain, which is admin.dnsimple.com.
  • A timestamp that changes whenever you update your domain.
  • The number of seconds before the zone should be refreshed.
  • The number of seconds before a failed refresh should be retried.
  • The upper limit in seconds before a zone is considered no longer authoritative.
  • The negative result TTL (for example, how long a resolver should consider a negative result for a subdomain to be valid before retrying).
  • TXT – A TXT record is a type of DNS record that aren’t used to direct any traffic, but provide text information to sources outside your domain. The text can be either human-or machine-readable and can be used for a variety of purposes.
  • SPF – An SPF record is a type of Domain Name Service (DNS) record that identifies which mail servers are permitted to send email on behalf of your domain. The purpose of an SPF record is to prevent spammers from sending messages with forged From addresses at your domain.
  • DKIM – is an email validation system designed to detect email spoofing by providing a mechanism to allow receiving mail exchangers to check that incoming mail from a domain is authorized by that domain’s administrators. A digital signature included with the message can be validated by the recipient using the signer’s public key published in the DNS.

 

Record Value – This is normally the host name of the server, which also requires a dot at the end. If you do not include the trailing dot your domain name will be appended to the end of the record causing incorrect results.

 

Record TTL – The TTL (Time to Live) is the amount of time your record will stay in cache on systems requesting your record (resolving nameservers, browsers, etc.). The TTL is set in seconds, so 60 is one minute, 1800 is 30 minutes, etc..
Systems that have a static IP should usually have a TTL of 1800 or higher. Systems that have a dynamic IP should usually have a TTL of 1800 of less.
The lower the TTL the more often a client will need to query the name servers for your host’s (record’s) IP address this will result in higher query traffic for your domain name. Where as a very high TTL can cause downtime when you need to switch your IPs quickly.

 

DNS Propagation – DNS propagation is a term to describe the updating of information across the Internet. It takes two forms: changes to your DNS Zone and changes to your WHOIS information. A change to your DNS Zone information typically affects only a handful of servers, and completes much more quickly. Time frames vary for each type of DNS or Whois change but normally Whois changes we suggest a 24-48 hour time frame and DNS record changes about a 4-12 hour time frame.

 

Reverse DNS – Reverse DNS is ip address to domain name mapping – the opposite of forward (normal) DNS which maps domain names to IP addresses. Reverse DNS is mostly used for such things as tracking where a web-site visitor came from, or where an e-mail message originated, etc. However reverse DNS is important for one particular application. Many e-mail servers on the internet are configured to reject incoming e-mails from any IP address which does not have reverse DNS.

 

DNS Caching

DNS servers don’t really like doing all that work to resolve DNS names, but they’re not stupid. They know that if a user visits www.wiley.com today, he’ll probably do it again tomorrow. As a result, name servers keep a cache of query results. The next time the user visits www.wiley.com, the name server is able to resolve this name without having to query all those other name servers.

The Internet is constantly changing, however, so cached data can quickly become obsolete. For example, suppose that Wiley Publishing, Inc., switches its website to a different server? It can update its name servers to reflect the new IP address, but any name servers that have a cached copy of the query will be out of date.

To prevent this from being a major problem, DNS data is given a relatively short expiration time. The expiration value for DNS data is called the TTL (Time to Live). TTL is specified in seconds. Thus, a TTL of 60 means the data is kept for one minute.

Dns caching is good to keep in mind when we can access things at other location and one location cannot (or shows a different view) as it could be feeding from a cached copy somewhere.