Domain Name Knowledge Base | Cheap Domain Name Registration

How DNS Zone File Works

Page 7: DNS SOA Resource Record

The first record in a DNS Zone File is the SOA (Start Of Authorization) Resource Record. There is only one SOA Resource Record allowed in a DNS Zone File.

In short, the SOA Resource Record indicate the start of DNS Zone File.

Main Information of SOA Resource Record

The main information of SOA Record are usually:

  • Name of Domain Name Server, and
  • Email address of responsible person of Domain Name Server

The general format of SOA Resource Record is shown in the diagram below:

DNS SOA Resource Record

In addition to the above main information, some general setting of Domain Name Server can also be included in SOA Resource Record. There are a lot of setting of Domain Name server. However only some important setting will be included in the SOA Record. We discuss four important setting of Domain Name Server in this tutorial. They are:

  • Serial
  • Refresh
  • Retry
  • TTL (Time To Life)

The following example is a rather complete SOA Resource Record:

DNS SOA RR

Serial

The serial data is used to record down the changes of DNS Zone File. Whenever the record of DNS Zone File update for one, the Serial data will be increased by one.

Take the above Serial (200105508) as an example. The Serial has been set for the Year (2001), the Month (05) and the number of update in that month (508). When there is an update for the DNS Zone File, the serial will become 200105509, and the next update will then be 200105510, etc….

Of course you can set the serial start from zero. Whenever there is an update, the serial number will be increased by one.

The Secondary Name Server will regularly check and compare with the information of Primary Name Server. When she find the Serial number of her own SOA Resource Record is different from the Primary Name Server, she will know immediately that the information of the Primary Name Server has been changed. Therefore the Secondary Name Server will update her records accordingly.

Refresh

The value of Refresh is represent by seconds. In the above example, the Refresh time is 10080 seconds (or 3 hours)

This is the setting that how long the Secondary Name Server will check and compare with the information of Primary Name Server. This is used to check if there is any changes of information of the Primary Name Server.

Retry

The value of Retry is also represent by seconds. In the above example, the Retry time is 3600 seconds (or 1 hour).

This is the setting that when the Secondary Name Server fail to connect with the Primary Name Server, how long it will try to connect again.

TTL

The full name of TTL is Time To Live. You can also think of "Time To Survive". The value of TTL is also represent by seconds. In the above example, the TTL is 86400 seconds (or 24 hours).

As we learned from the DNS tutorial. When the default Domain Name Server do not has the IP address information of query domain name (e.g. YourDomain.com), she will ask other Domain Name Server for assistance and reply the answer to your computer. The default Domain Name Server will then save the query result into her Cache memory for a period of time before discard. This period of time is called Time To Live (TTL). This is best explained with the diagram below:

DNS TTL

You may wonder why the Domain Name Server save the query result into her Cache memory for a period of time before discard?

The reason is very simple. Because the same domain query may happen again. If this really happens, the Domain Name Server do not need to ask and bother other Domain Name Server again. She can get the result from her Cache Memory and reply the query promptly. This can increase the query efficiency greatly, as shown in the diagram below:

DNS Zone File TTL explain

Remember that the information will only save in the Cache Memory for the set TTL time.

You may also ask. If this can increase the query efficiency, why not save the information in the Cache Memory longer? For example, one or two months, or even one year!

The reason is very simple. Because when the information of the domain name is changed, and the information saved in the Cache Memory is out of date. In this situation, the domain name will be lost. This explain why your domain name may be lost for some time after you changed the information. This situation is illustrated in the diagram below:

DNS TTL cache memory

This is the end of DNS SOA Resource Record.

domain name knowledge base