0

The default TTL ($TTL) is set at the head of the zone file. Individual resource records do not have TTL.

$TTL 86400 ;default TTL (1 day)
@ IN SOA ns1.xx.xx.cc. admin.xx.xx.cc. (
2022031800 ; serial yyyymmdd+
3H ; refresh
15M ; retry
1W ; expire
12H ) ; minimum
IN NS ns1.xx.xx.cc.
IN NS dns2.xx.xx.cc.
....
www IN A m.m.m.m1  ;this one is being moved outside 
www1 IN A m.m.m.m2
www2 IN A m.m.m.m3
...

m.m.m.m is the IP address of the current server.

The website www.xx.xx.cc is being moved to an external, rental server. All the other subdomains (www1.xx.xx.cc, www2.xx.xx.cc, etc.) will have no change.

The rental server helpdesk tells me I need to change A-record for that resource (www1.xx.xx.cc), which I can do.

I want to minimize disruption after the dns entry change, so I want to add TTL for that A-record, while keeping the default for all others.

It it possible? I am afraid to try because I have no knowledge about DNS and I might break things.

So in short, assuming "n.n.n.n" is the new IP address (of the hosting server), can I change current A-record
from "www IN A m.m.m.m1" to "www 300 IN A n.n.n.n"? (5 minutes), while still keeping the default TTL (86400) for all other records?

Thank you for reading and replying!


It may be possible: TTL values for external DNS records

The writer says: "The default is set for 24 hours and I have individual TTL values set for each individual record."

I would like to hear confirmation or denial or something in between.

0

1 Answer 1

1

You asked, can a DNS 'A' record have an individual TTL when there is already a default TTL at the top of the file?

Yes it can.

dig hour.roaima.co.uk | grep -F 1.1.1.1
hour.roaima.co.uk.      3600    IN      A       1.1.1.1

dig minute.roaima.co.uk | grep -F 1.1.1.1
minute.roaima.co.uk.    60      IN      A       1.1.1.1

Extract from bind zone configuration file

; https://unix.stackexchange.com/q/696925/100397
minute          60      A       1.1.1.1
hour            3600    A       1.1.1.1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .