-1

I'm using Linux DNS and I'm not sure which row I should change if I want to change the TTL of my dns.. This is the TTL part:

$ORIGIN biz.
$TTL 3600
sop1    IN      SOA     ns1.mydomain.net. hostmaster.mydomain.net. (
                        2012022901
                        18000
                        3600
                        604800
                        86400 )
Shlomi
  • 331
  • 2
  • 9
  • 19

1 Answers1

2

You define the default TTL with the $TTL option which will be used for all subsequent resource records that don't set a specific TTL value.

$TTL 3600  ; <=== default expiration time of all resource records without their own TTL value
sop1    IN      SOA     ns1.mydomain.net. hostmaster.mydomain.net. (
                        2012022901
                        18000
                        3600
                        604800
                        86400 )

A resource record such as:

mail          IN  A     192.0.2.3             ; IPv4 address for mail.example.com

will get the default TTL value of 3600 seconds that you had defined at the top af the zone file since it doesn't specify any particular TTL for that record.

The example below does set a specific TTL as the second field, 86400 seconds = 24h overriding the default TTL value:

mail2  86400  IN  A     192.0.2.4             ; IPv4 address for mail2.example.com
HBruijn
  • 77,029
  • 24
  • 135
  • 201