How to Create a Website
Creating a website is a not a difficult thing to do. All you need to do is follow the correct sequence of events. Almost Everyone who knows about the internet knows what a domain name is. It is what identifies a unique website or email server. When you send an email to [email protected], the domain.com forms the domain name. When you type in http://domain.com in the address bar of your browser, the domain.com is the domain name of the website you are going to see.
But how does the computer know which page to show when there are almost infinite number of domain names possible ? How does it know where to fetch the webpage from ? How to create a website? This article answers these question and explains what you need to do to register and setup your domain and tell all the computers in the world that yourdomain.com should show your web page.
How to choose a domain name ?
There are many top level domains (TLDs) the most popular are the .com, .net and .org – Countries have their own like .us, .in, .ca, .au etc and then there is the new breed of domains like .tv, .info, .ws and so on but the most powerful king of all is the .com Why ? Because it came first ? In the domain market, single word domains sell for thousands of dollars and .com costs around 10 times more than the others and is as difficult to get a new name. There is a myth that domains with hyphens (dashes) are better for search engine rankings, I think there may be some truth in that myth, but domains without dashes always seem to cost more than the ones with dashes. The best way to register a domain is to determine the keywords you are going to target by using the free trial of keyword popularity and competition analysis from wordtracker.com and get a domain with those keywords in it. Another school of thought abandons this approach and advocates brand name domains like yahoo.com instead of everything-portal.com google.com instead of the-only-search-engine.com and ebay.com instead of online-junk-acutions.com – you get the picture.
Name Servers Explained
Every computer connected to the internet has an ip address that looks like 220.127.116.11
An ip address consists of 4 numbers separated by dots, each number ranging from 1 to 255. What this numbers mean is not important for us, all we need to understand is that each computer on the internet has a unique ip address and if the GoldenRobot wants to talk to R2D2 on the internet, it has to know the IP address of R2D2 (name borrowed from the movie Star Wars).
But Wait a minute, does that mean that there are only 256*256*256*256 number of computers that can connect to the internet, technically yes. But that number is large enough for now until they start connecting ever microwave and freezer to the internet (imagine your freezer automatically placing an order for 2 liters of milk to the grocery store when it detects that your milk stock is diminishing!)
OK, now you must be thinking all the ip address stuff is fine, but how does it relate to domain names ? Remember that I said “if the GoldenRobot wants to talk to R2D2, it has to know the IP address of R2D2 ” – but all you give to your computer is the Domain Name of the website you want to visit, so how can it get the ip address ? Enter the NameServer.
The job of a nameserver is to resolve a domain name to an ip address. Simple.
A nameserver is similar to a telephone directory except that instead of mapping person names to phone numbers, it maps domain names to ip addresses.
Imagine having just one telephone directory for all the people in the world ! In the same way, if they had just one nameserver for all domains, it would be unmanageably huge and all the computers would have to contact that one nameserver to get the domains resolved to ip addresses ! Even a super-duper-mega-monster-computer would not be able to handle such a load !
So we have many nameservers. When you register a domain, you specify which name server to use.
Now lets take our example
GoldenRobot wants to talk to R2D2
It will have to follow these steps
Look at the registrar entry for R2D2 to determine which nameserver to use
Connect to that nameserver and ask it for the ip address of R2D2
Connect to R2D2 using this IP address
In reality it is a bit more complicated due nameserver cacheing, and chained recursive lookups leading to authoritative and non authoritative responses but our example illustrates the basic concept and is sufficient knowledge to setup your domain.
One misconception that I would like to clarify, some people think that each domain name maps to a unique ip address, not true. Just as many people in a house can share a single telephone number, many domain names can share a single ip address. The NameServer will return the same ip address for all of these domains and when the browser connects to that ip address, it says I am trying to reach suchandsuch.com domain, the webserver then returns the correct page for the domain requested. Obtaining a unique ip address (known as dedicated ip) for your website is usually more expensive than sharing the ip address.
How to setup your domain name
Form the discussion we just had, you would be able to appreciate that in order for you to get your domain to point to your webpage, you need to do the following in theory
Obtain the ip address for the web host where your WebPages reside – this is the webserver ip
Make an entry (Called as DNS Entry) in a Nameserver to resolve your domain name to this ip address.
Configure your domain to use this nameserver
Most of the time, step 2 will be transparent to you as most webservers provide nameservers in which they make the DNS entry for you when you purchase webspace from them. Also, many good domain registrars provide their own nameservers that you can use.
While registering a domain or after registering a domain, you will need to set it up to use two or more nameservers. It is common to use multiple nameservers so that if one of them is down the others may be used.
You have three options to set the nameservers
Nameserver provided by your web host
Your webhost will usually have their own nameservers. In their documentation they may say you need to use something like ns1.yourwebhost.com and ns2.yourwebhost.com – If you use these, you need not bother about the webserver ip address or any other settings, just configure your domain to use these and you are all set.
Nameserver provided by the registrar that you register your domain with
If you use this option, you will need to know the ip address of your webserver (provided by your webhost). As you will be using the nameserver provided by your registrar, you will need to set it up to point to the correct ip address for your website by creating a DNS entry. The ip address for your webserver is called as the A record and the ip address for your mail server is called as the MX record, CNAME records are used if one domain needs to be similar to another domain, but you do not need to understand these options for a basic setup. Many top notch domain registrars in the industry provide advanced DNS management like forwarding your domain to another site, subdomains, email id management, wildcard dns etc
Third party nameservers
This is an option that very advanced domain managers prefer when they wish to have more features and greater control over their DNS records which may not be provided by the registrar or the webhost.
Now a days, the line between the web hosts and the domain registrars is fading as most domain registrars are providing web hosting and most web hosts are providing domain registration. If you purchase your domain registration and web hosting from the same company, chances are that you may never need to do any setup at all.
What to look for in a registrar
It is always a good idea to register your domain with a domain registration site rather than with your webhost so you can be able to shift your webhost in case you need to without loosing your domain.
A good domain registrar should provide you the following features
No Cost Domain Forwarding – To Point your domain to anywhere you choose, you can even use a long free web host url and forward your domain to it.
No Cost for Change of Registrant – Makes sure you can change registrars (transfer out to another registrar) for your domain without paying a heavy fee.
No Cost Domain Parking – You get one page saying your site is under construction or something like that.
Domain Name Locking – makes sure that no one can initiate a transfer request until you unlock your domain
DNS Server Changes – You should be able to login to your own control panel and make any changes yourself
Trouble Shooting Domain Name Problems
What can you do if you have trouble setting up your domain? First of all, remember that it may take up to 48 hours for your domain changes to propagate across the internet.
The whois report on any domain will tell you about the current nameservers attached to that domain in addition to the contact addresses, the registration date, expiry date and the date when the last modifications were made to that domain record. If the nameservers are not correct then you know you have to change them by logging into your domain name control panel or by contacting your registrar support. If the name servers that are shown are correct, then you can use the nslookup tool (Advanced DNS Lookup) from the same page to determine the ip address being returned for your domain by any nameserver. Here you should enter one of the nameserver that you find in the whois output and see what ip address it returns for your domain name.
If it does not return an ip address then the nameserver has to be configured to point your domain to the correct ip address, or you may be using the wrong nameserver.
If it returns an ip address, You can try typing the ip address directly into the address bar of your web browser, if it gives a 404 page not found error, then either the ip address is wrong or the webserver is down. If it returns some generic page but not your webpage, that is all right, this is to be expected unless you are using a dedicated ip address. Make sure that the IP address returned is the correct one that your web host is providing to you. If you are sure that the ip address is correct and still your website does not show when you type in your domain name in the address bar of your browser, then it may be that other people are able to access your site and only you are not able to access it because your local nameserver does not resolve your domain or resolves it wrongly. In that case, if you can find out the nameserver your local machine is using, you can enter that nameserver in the nslookup tool and see what ip address it is returning. If your local nameserver is returning the wrong ip address all you need to do is wait till the dns changes propagate to your local nameserver, If your local nameserver is returning the right ip address, then you must contact your web host to inform them that their webserver is not configured to support your domain.
We have covered a lot of ground here, from registering a domain to setting and trouble shooting it. Even if you never need to configure a domain, reading this article gives you an understanding of what goes on behind the scenes when you type a domain name in your browser. For the advanced domain manager, we reviewed domain configuration options and tips on troubleshooting.