Every domain (website) that is hosted on a server corresponds to some IP address. As we already know that if we want to create a website and make it go online so that it can be viewed from all over the globe then we need two things.
Domain – A domain is the name of the website which is in the form of something.something for example google.com, redserverhost.com etc. Every domain needs to be pointed towards a server.
Hosting – Hosting means to put your website on server. Every server has one main IP through which it serves the files to all the domains hosted on it if they are pointing towards the server.
So this means each and every website across the globe is pointing towards some server, but how does this happen?
Here comes the concept of name servers. Name server is a fundamental part of DNS – Domain Name System. It allows to use domain names instead of server’s IP. When any domain name is browsed, then the name server behind the domain points to the server on which it is hosted. They are primarily two in number but it can be three or four also.
The basic structure of name server looks like:
If you want to check if your website’s DNS are working fine or not you can go here.
How Do I Create Name Servers?
To create name servers of your own (custom name servers) you need to login to your Domain Control Panel. There you will see two main things:
Child Name Servers (or Hostname)
To create a name server, click on child name server. In the dialog box that opens up, enter the names of two name servers you wish to create and then write the corresponding IP address of the Server. Note that here you can write the server’s main IP in IP fields or you can write additional IPs assigned by server to be used as name servers.
Suppose here my domain name is – fullcracked.com and my server IP is 188.8.131.52 and I am creating name servers as ns1.fullcracked.com and ns2.fullcracked.com
Next step is to login to the cpanel/hosting account/server where this website is hosted. There go to the DNS Zone editor and for this domain create new entries as A record, write ns1 and ns2 as the record names, make them A-records, write server’s IP and save. Now any domain can use these name servers.
In simple words, hostname is the name given to a server. A hostname always correspond to the server’s main IP address. It can be used to refer to a server without naming its IP address.
According to wikipedia, In computer networking, a hostname is a label that is assigned to a device connected to a computer network and that is used to identify the device in various forms of electronic communication, such as the World Wide Web. Hostnames may be simple names consisting of a single word or phrase, or they may be structured.
How Do I Create A Hostname?
To create a hostname, just follow same procedure as you have done for name servers. Go to child name servers inside your domain control panel and just add another entry after your name servers, hostname and then write the server’s main IP in the IP address field. For example: server.fullcracked.com and thats it.
Now you can refer to your server using this Hostname. When you ping the sites hosted on your server, they will return your server’s main IP. To ping a site through windows operating system, go to Start -> run -> command prompt (or cmd) and type this –> ping domain.com and press enter.