Webpage rendering, it is very simple for those who understand it and I must say very difficult for the one who doesn’t. With the increase of online access in India many are ready to spend a couple of dollars every year for their own .com experience. Still many are not clear about its working. I was suppose to explain this to few of my friends so thought of putting it online.
Since this blog post is going to be long, let me put the document index for easy navigation:
- Basic terms and its Wiki definitions.
- Basic steps to setup a website.
- Explaining different parts of an URL.
- Do you understand IP now?
- What is DNS?
- Scenario 1: When the website is new without IP being cached.
- Scenario 2: When the website’s IP is cached.
- Summary
Section 1: Basic Terms
Some basic things you should learn before reading the post
- What is a web server?
- What is a domain name?
- What is a URL?
- What is HTTP?
- What is a browser?
- What is an IP address?
- What is an ISP?
- What is a Dial up connection?
I am assuming that the user is browsing http://www.idealwebtools.com/nimc/forum/ using firefox browser with a dial up Internet connection.
Section 2: Steps to set up a website
- Think of an easy domain name and book it with a registrar.
- Get a hosting company. (I recommend asmallorange.com for various reasons; you can use my referral aji99). Hosting company gives you space (a document root folder) to put your files. You can upload the files using FTP (the simplest protocol) by using a FTP client like Filezilla. Over here you need to add your purchased domain as a primary domain. (You can also add it as an addon or parked domain).
- Ask your hosting company for DNS server details (like in my case it is ns1.asmallorange.com and ns2.asmallorange.com)
- Login to your domain registration panel (The site from where you bought your domain) and enter the name server details provided by the hosting company.
- Within 24 to 48 hours it will start working.
Did not get anything! Don’t worry let’s take it again
Section 3: Explaining different parts of an URL
A small explanation of the URL http://www.idealwebtools.com/nimc/forum/
- Here the first part http:// tells your browser the protocol (the rules, or the language) to talk to the web server (asmallorange.com where idealwebtools.com is hosted).
- The next part idealwebtools.com is the domain name (usually without www also you can get the pages, this needs further explanation, let me know if needed).
- “/nimc/forum/†tells the web server to look into the folder /nimc/ and then under nimc folder look for /forum/. The search is done only inside the document root of the web server.
Section 4: Do you understand IP now?
No, good. Let me explain. In simpler words it is the address of an entity on Internet. In other words your computer has an IP, idealwebtools.com has an IP, every single computer on this Internet gets a unique IP. Consider IP to be the address of the different computer on Internet. See what is your computer’s IP http://www.idealwebtools.com/myip.php. If you are using Dial up connections you get a new IP every time you connect to the internet. Idealwebtools.com has an IP, which is 63.247.68.87 (ping the domain to get the IP). Which one is easier to remember 63.247.68.87 or Idealwebtools.com? Certainly idealwebtools.com.
Section 5: What is DNS?
DNS or “Domain name server†is a server, which maps idealwebtools.com (an easy to remember name, which remains constant) to an IP (hard to remember number, it can also change).
Let’s take 2 scenarios when Ajesh (hey, that’s my brother) accessing http://www.idealwebtools.com/nimc/forum/ from Banglore :-
Scenario 1:
Assuming that I have registered idealwebtools.com within last 24 hours and was never accessed by anyone in the world so far.
- Step 1: Ajesh types http://www.idealwebtools.com/nimc/forum/ on his firefox browser.
- Step 2: Ajesh’s computer looks for the idealwebtools.com’s IP inside its host file (in win 2000 it is inside WINNT/system32/drivers/etc/hosts). IP is not found.
- Step 3: Since Ajesh is connected to the internet using a BSNL connection (his ISP) where he specified the DNS server as 61.0.0.5 as provided by BSNL, it asks 61.0.0.5 for the IP of idealwebtools.com. Even 61.0.0.5 says, “I do not know the IP of idealwebtools.comâ€.
- Step 4: When a DNS server doesn’t know the IP of a domain it sends the request to a small number (13) of servers (also known as root name server), which are suppose to know the authoritative servers (name servers specified at section 2 step 4, A server which knows the IP address for idealwebtools.com, in our case it is ns1.asmallorange.com or ns2.asmallorange.com, which will have the final word) for the domain.
- Step 5: The severs responsible for the generic top-level domains for .com sends the request to the authoritative servers for IP of idealwebtools.com.
- Step 6: Authoritative servers (which is domain based, Authoritative servers for idealwebtools.com will be different from that of google.com), in our case it is ns1.asmallorange.com (69.56.131.114), and then sends the IP to the requested DNS. In the path all the other servers involved caches the IP for the domain.
- Step 7: Once the IP is known it sends the packets using TCP/IP.
Scenario 2:
Assuming that idealwebtools.com is browsed frequently by different people.
- Step 1: Ajesh types http://www.idealwebtools.com/nimc/forum/ on his firefox browser.
- Step 2: Ajesh’s computer looks for the idealwebtools.com’s IP inside its host file (in win 2000 it is inside WINNT/system32/drivers/etc/hosts). IP is not found unless it is not added manually or you are running an application.
- Step 3: Ajesh’s computer checks the DNS provided by BSNL and it finds the cached IP and the communication starts.
Summary
Connection checks the IP of the website at the closest level and travel up to the Root Name Servers to get the Authoritative, which knows the IP for sure.
If you have doubts please let me know I will explain, also subscribe to my blog for more useful posts.
high testosterone side effects