In the case that you need to add a record o delete a record, then the same file will have to be edited. What is the DNS zone file exactly? In this file, the DNS records of our domain are stored. If we place two records in the same line, the DNS zone will not work properly, so remember to never do this.
And what kind of records can be used in a DNS zone file? First, we must specify the data portion of this record. In the case of an A record, this would be the name of the subdomain.
Any host label within a record that uses a fully qualified domain terminating with an ending period will not append the origin hostname. This is typically used for the apex of a zone. A Start Of Authority record is required for each zone.
A zone file is a collection of resource records with each record entry described in the following sequence:. In the following example, IP addresses There is very little difference between this example and a standard zone statement, except for the zone name. Note that a reverse name resolution zone requires the first three blocks of the IP address reversed followed by. This allows the single block of IP numbers used in the reverse name resolution zone file to be associated with the zone.
Zone File Directives. Zone File Resource Records. IN MX 10 mail. IN MX 20 mail2. NS This refers to the NameServer record, which announces the authoritative nameservers for a particular zone. IN NS dns1. IN NS dns2. SOA This refers to the Start Of Authority resource record, which proclaims important authoritative information about a namespace to the nameserver.
Seconds compared to other time units. Example Zone File. Reverse Name Resolution Zone Files. So if you repeatedly do a dig for google.
So let's find out the exact TTL value for Google. So you will always get the TTL value of , when you do a dig by using ns1.
There are two things that you need to consider about TTL value. Which means the servers which gives you the address of authoritative name server for a domain, has a higher value TTL. The default value of that TTL most of the times is 48 hours 2 days. That large value is correct, because its very less often that people change the authoritative name server IP addresses note the fact that the above output is the data given by a.
SOA is the mandatory record that must be there in all zone files. It specifies the main properties and characteristics of a domain. We will walk through each of them one by one. The default format of specifying a SOA record is shown below. NAME: This specifies the name of the domain.
As mentioned before, i am using a zone file made for bind DNS server. If you see our SOA begins with the following line. IN SOA ns1. Using at this place will replace it with example.
So www. The final DOT specifies the root name servers. RR : This specifies the resource record name. Please note the fact that there must be a A record for this name server later in the same zone file that will specify the IP address of that name server. We will be discussing A records in some time. But if you see our example zone file, you will see that its admin. That's simiply because sign in zone file has some different meaning other than email address.
Serial number tells the modification date of the zone file. Every time you modify the zone file, you also need to modify the serial number. Serial numbers in zone file follows a date format of yyyymmddss. Which means if you have edited your zone file on 12th September , your serial number will be This entry of serial number is mostly used for zone transfer to confirm the last modification of the zone.
We will be discussing the zone transfer stuff in a dedicated post. EXPIRY: This specifies the duration after which the slave name server will stop responding to DNS queries if the connection to master server cannot be established by following retry interval. If you see the above dig command, i have used a domain name that does not exist. So the name server for google. Hence our final zone file SOA record will look something like below, which was also previously shown in the image. This record specifies the DNS server responsible for this domain.
In our example zone file shown previously, we have two name servers dns servers responsible for the example. One is ns1. The IP address for both of them needs to be defined in the zone file as A records. The format of defining NS record is very simple and straightforward. In reality you can also write this NS record as shown below.
But if you see our example zone file we have defined NS record as shown below.
0コメント