Deprecated: Function create_function() is deprecated in /home2/blogwebhostingbu/public_html/wp-content/plugins/facebook-like-box-responsive/facebook-like-box.php on line 29
{"id":447,"date":"2009-03-30T07:11:48","date_gmt":"2009-03-30T07:11:48","guid":{"rendered":"http:\/\/www.webhostingbuzz.com\/blog\/?p=447"},"modified":"2009-03-30T07:11:48","modified_gmt":"2009-03-30T07:11:48","slug":"what-exactly-is-dns-and-what-does-it-do","status":"publish","type":"post","link":"https:\/\/blog.webhostingbuzz.com\/2009\/03\/30\/what-exactly-is-dns-and-what-does-it-do\/","title":{"rendered":"What Exactly is DNS and What Does It Do?"},"content":{"rendered":"

The Domain Name System (DNS) is an essential element of the Internet, responsible for tying a domain name to the IP address where that domain resides. \u00a0Since humans can only memorize so many twelve digit IP addresses (for example: 127.243.238.123), DNS was created as a way to take that IP address and create a unique human-identifiable name to be related with it. \u00a0Because of DNS, you can type “google.com” into your browser and it magically finds the Google server.<\/p>\n

It comes in handy to thoroughly understand the DNS system because you use it constantly as a web developer or server owner, so let’s take a moment to see how this process works.<\/p>\n

DNS Resolution<\/h3>\n

When you type “google.com” into your browser and hit enter, many things happen behind the scenes that you never see:<\/p>\n

    \n
  1. The browser takes the name “google.com” and sends a DNS request to the default name server setup by either your IT staff or your ISP. \u00a0Basically, it asks “Where is google.com?”<\/li>\n
  2. The default name server looks in its DNS table to find “google.com”. \u00a0If it has an entry for it, it sends back the corresponding IP address. \u00a0If it does not have an entry, it forwards the request to another DNS server – typically operated by your ISP.<\/li>\n
  3. The next name server looks at its table, and hopefully has an entry for “google.com” and is able to respond with its IP address. \u00a0Although this process could repeat, it typically doesn’t exceed 1-3 forwards before it finds the correct entry.<\/li>\n
  4. The browser receives the response saying Google’s IP address is “74.125.67.100” and then sends a request to\u00a074.125.67.100 for the page you asked for.<\/li>\n<\/ol>\n

    <\/p>\n

    See the Process in Action<\/h3>\n

    If you are a Windows (XP\/2000) user, click on Start, Run, and type “cmd” without the quotes, and hit enter. \u00a0<\/p>\n

    Windows Vista users need to find the command prompt in their Start Menu.<\/p>\n

    A command prompt should come up after you have done this. \u00a0From here, type “nslookup google.com”. \u00a0If you are connected to the internet and DNS is set up correctly, you will see something like this:<\/p>\n

    \"dnsinaction\"<\/a><\/p>\n

    As you can see in my case, my router acts as a DNS server (or it forwards the request to the ISP if it does not have any record of the domain I request.) \u00a0In this case, the ISP returns three addresses: 74.125.67.100, 74.125.45.100, and 209.85.171.100. \u00a0All three of these addresses can be used to get to Google if you type them into your web browser – the result would be the same as if you typed in “google.com”.<\/p>\n

    What Happens if DNS is Not Working Properly?<\/h3>\n

    If DNS is not working, you can not access any domain by it’s domain name, but instead must use the server’s IP address. \u00a0How many server IP addresses do you have memorized? \u00a0Probably not many.<\/p>\n

    If you can visit most sites, but can not visit one of your own, it is possible that this is due to a DNS error. \u00a0A few times over the years, one of my domains have gone down in a fluke DNS problem from my ISP. \u00a0The way to test this is to ask a friend on a different ISP to try to visit your site. \u00a0If he can get through, it is likely you are experiencing DNS problems.<\/p>\n

    DNS “Propogation”<\/h3>\n

    A myth among internet users is that DNS has to magically “propogate” from one server to another, populating all across the world, which can take hours. \u00a0In practice though, this is not true. \u00a0DNS uses a caching feature set by the DNS server which sets a timed cache on a DNS query. \u00a0This way, when you try to go to Google.com each time you open a tab in your browser, the computer does not have to go out and look for the IP address every time. \u00a0It stores a cache of these records for a predetermined period of time to save time the next time it has to find Google.com.<\/p>\n

    Name Servers<\/h3>\n

    When you purchase a domain, you have to point your domain to name servers (NS) so DNS requests can find your web server’s IP address. \u00a0The NS is a record that points your domain to a particular DNS server that stores your records.<\/p>\n

    Types of DNS Records<\/h3>\n

    The most common records you will find in DNS include:<\/p>\n