This article will explain what happens when a website name is entered into a browser s address bar and the "Enter" key is hit. For simplicity, this article won t cover all the aspects of Internet communication, but it will focus on basic communication between a client browser and an HTTP server.
Basically, the purpose of DNS is to make human life in Internet easier. Computers on the Internet are finding each other using IP (Internet Protocol) addresses. It is a dotted number in form (e.g.: 11.22.33.44). The numbers are decimal values of one byte (0-255). It is very hard for us, as human beings, to use these addresses every time we want to reach a server on the Internet. That s why some wise guy (see references below) invented a system which converts these numbers into names and called it DNS. It is important to remember that the main task of a is not only to convert words to numbers, but also for finding hosts and services on the Internet in general.
HyperText Transfer Protocol (HTTP) was designed to retrieve resources on the World Wide Web . It is an application protocol which web browing software applications can understand. To transfer data, HTTP is wrapped by a layer 4 protocol called "tcp" (see references below), and this is how a server responds to your query. In any browser, you will find that it has a field called "Address Bar". The website address you type into the browser isn t actually an address, but a URL (Unified Resource Location). You should familiarize yourself with URLs and all their parts: protocol://host/query_string
After you type a URL into a browser, these actions are taken once you hit "Enter":
If your browser has found a host to connect with, and successfully sent its query string, sometimes you can receive an HTTP redirect in response. An HTTP redirect is a special response header. Your browser recognizes it by reading an HTTP response code which is a number in the range or 300-304. A 301 code means moved permanently . The response header contains additional data relative to the code used. For 301, it is an URL. This is where the magic occurs – after receiving a 301 redirect, most browsers won t ask you if you want to follow this redirect or not, they will just do it automatically for you. To follow a redirect, all of the actions described above are repeated but using a different URL. This means that your browser will issue another DNS query, eventually make new tcp connection, and send the query obtained from a redirect to a server.
In real life, it is not that easy. When you type in your query you may receive results that you don t expect. When this happens, follow the steps below to find what is happening.
Press Start, Run, and type: cmd. At the command prompt, type: nslookup domain.com. Look for the IP address. Try to find out if it is an address you expected. If you don t know, ask someone who knows.*
Open terminal and use: dig domain.com or host domain.com. Look for the IP address. Try to find out if its address you expected. If you don t know ask someone who knows.*
The following is a real-life example. We are having an issue with the following site: ace.nd.edu. The domain is hosted on oiur DNS, so there is no possibility of changing its records. The administrator wants to have an obligatory redirection form ace.nd.edu to www.ace.nd.edu. To make this redirect, he has created redirection rules using mod_rewrite. After tha,t when you enter http://ace.nd.edu into a browser, it displays a redirection error (a page can t be displayed). What is happening?
It comes out that the domain name "ace.nd.edu" is pointing to our server s IP address, but the domain name www.ace.nd.edu is pointing to a different host. When you write www.ace.nd.edu into a browser you are connecting with a server on the World Wide Web which is not ours. This causes a 301 redirect to ace.nd.edu. After resolving this redirect you will land on our server, which, in turn, sends you a 301 redirect to www.ace.nd.edu. Here we have a re-directions loop and the browser will display an error. How can we resolve this?
It depends on the client. If the client really wants this obligatory redirect, he must be taught how to change the DNS record for www.ace.nd.edu so it will point to our IP address. If the client doesn t care about his site name appearing in browser s address bar, just delete it and rewrite rules from the .htaccess file.
That s it! I hope this basic knowledge about resolving site names works in the global network. If you have any questions please ask me: This email address is being protected from spambots. You need JavaScript enabled to view it.
* ask system administrator – he/she will tell you where is pointing domain name you are asking for or will tell you if this domain name is hosted by us.
We take a great deal of pride in our knowledgebase and making sure that our content is complete, accurate and useable. If you have a suggestion for improving anything in this content, please let us know by filling out this form. Be sure to include the link to the article that you'd like to see improved. Thank you!