Every domain (website) that is hosted on a server corresponds to some IP address. As we already know 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 putting your website on the 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 are pointing towards some server, but how does this happen?
Here comes the concept of name servers. A name server is a fundamental part of the DNS – Domain Name System. It allows using domain names instead of the 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 the name server looks like this:
If you want to check if your website’s DNS is 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 log into your Domain Control Panel. There you will see two main things:
Child Name Servers (or Hostname)
To create a name server, click on the 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 the server to be used as name servers.
Suppose here my domain name is – fullcracked.com and my server IP is 18.104.22.168 and I am creating name servers as ns1.fullcracked.com and ns2.fullcracked.com
The next step is to log in 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, the hostname is the name given to a server. A hostname always corresponds 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 the 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 that’s 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 the windows operating system, go to Start -> run -> command prompt (or cmd) and type this –>pingdomain.comand press enter.