What is a ‘nameserver’?
Every domain that is used on the internet needs to be registered. It doesn’t matter the extension of the domain name, the common requirement for all domain names is that it must have atleast two nameserves assigned to it.
The function of a namserver is to answer queries of browsers or email clients giving the IP address of the domain name.
Namservers are programs that run on Internet Servers continuously and either give the IP address of the domain name of the query or point to another namserver at a higher level that might have the answer.
The process continues until a ‘root’ namserver is reached which will have the answer.
Every cPanel has the ability to create namservers. The cPanel server is able to run a namserver program and is able to function as an Authoritative Namserver for domain names.
To create namservers with your domain name, you need to create a hostname of your domain name and assign an IP address to that hostname.
A hostname on a domain is the third level name. An example is ns1.cloudpap.com
STEP 1 – Creating namerservers
- Log in to your cPanel
- In the Domains section go to Subdomains
- Enter the name of the hostname e.g ns1 and click create; ns1.cloudpap.com will be created.
- Repeat the same for any other hostname you wish to use.
Note: To host your domain on your VPS, you will need to create at least 2 namservers.
Step 2 – Pointing the namserver to your IP address
Once the nameserver has been created, you will need to point it to your IP address. To do that:
- Log in to cpanel
- In the Domains section go to Zone Editor and click on Manage
Search for the specific namserver you created and click Edit to replace the IP address indicated there.
Note that you will be editing 3 entries as indicated above and in each entry, replace with your specific IP address. Also, in the third record, you will only be changing the IP address and leave the other details as they are.
Save each record after editing
You can create any number of hostnames with your specific domain and point them to your IP address using the same process.
Some of the hostnames can be used as namservers, subdomains for your applications or hostname for your VPS( It is recommeded that your VPS uses a subdomain as it’s hostname).
Once both of the previous steps are completed, you should wait at least 24 hours to be sure that your DNS changes have been completely propagated and are updated everywhere on the Internet.