Your Cart is Empty Reseller Login or Sign up FAQ Search

The DNS zone is a file on the server which has several functions:

1) signifies that the domain name is hosted on the server

2) lets other machines over the Internet know where the content of the domain name is located

3) allows you to point the domain name or its sub-domains to different locations (e.g. a different server with a different IP address)

In order for your browser to find out where the content of a domain name is, it asks the responsible Name Servers. The Name Servers are specific hostnames registered through the domain registrar to correspond to an IP address - e.g. the IP address of your VPS.

When the browser checks which the responsible Name Servers for my-best-domain.com are, the browser then asks directly the IPs of the Name Servers “is this domain name hosted with you?”. The NSes then check if they have a DNS zone for my-best-domain.com and see if the A record (the IP where the site is located) is on the same server or somewhere else. If the A record points to your VPS, the NSes will respond “yes, we have this domain, here you go” and the web page will be displayed. If the A record points somewhere else, the NSes will respond “we handle this domain, but its actual content is located at this IP address: XXX.XXX.XXX.XXX” and your browser will head to the specified IP to fetch the site content from there.

Adding a DNZ zone on a VPS via a Control Panel tool:

When you wish to host a domain name on a VPS that runs a Control Panel solution like DirectAdmin or cPanel, you need to add the domain name as ‘hosted' - create an account for the domain name, or host it in an already existing one. It is highly recommended that you do not attempt to create a DNS zone for a domain name manually on a VPS that runs a specific Control Panel solution, since this could cause issues with the proper functioning of the domain name in question or the whole web server.

If you need to add just a DNS zone for a particular domain name manually (e.g. when the server configuration requires for addon domains to already point to the server before they can be hosted or parked, due to security reasons), this can be done via the Control Panel solution you have installed on the VPS:

1) cPanel - the DNS zones are added via the WHM, either as a reseller or as root

cPanel - add DNS zone

2) DirectAdmin - the DNS zones are added at the Admin Level

DirectAdmin - add DNS zone

3) without a Control Panel - the DNS zone files are located in /var/named. You will have to log in as root via SSH and add manually a DNS zone file for the domain name:

#~: cd /var/named
#~: nano my-best-domain.com.db

Where “nano” is a simple text editor and you should just type in the content of the DNS zone. What a DNS zone file usually looks like on the inside is this:

$TTL 14400
@       IN      SOA     ns1.my-best-domain.com.      hostmaster.my-best-domain.com. (
												2010020500
												14400
												3600
												1209600
												86400 )

my-best-domain.com.      14400   IN      NS      ns1.my-best-domain.com.
my-best-domain.com.      14400   IN      NS      ns2.my-best-domain.com.

ftp     14400   IN      A       216.65.3.72
localhost       14400   IN      A       127.0.0.1
mail    14400   IN      A       216.65.3.72
pop     14400   IN      A       216.65.3.72
smtp    14400   IN      A       216.65.3.72
www     14400   IN      A       216.65.3.72
my-best-domain.com.      14400   IN      A       216.65.3.72
my-best-domain.com.      14400   IN      MX      10 mail

my-best-domain.com.      14400   IN      TXT     "v=spf1 a mx ip4: 216.65.3.72 ~all"
				

You should, of course, replace the IP address with the IP of your VPS and my-best-doman.com with the domain name you are adding the DNS zone for. Please note that there cannot be more than one DNS zone for the same domain name on one and the same VPS.

« Back to menu