Question about DNS, in particular NS and TTL. reddit / selfhosted ---------------------------------------------------------------------- NGL_ItsGood · 2023-11-11 17:39 Ok, so when a Name Server has a TTL of (for example) 48 hours, that means a resolver queries the name server every 48 hours for updated records of that domain (mx, a, cname, etc), correct? So if if the name server of my domain has a TTL of 48 hours, and I change my MX record and assign it a 60 minute TTL, resolvers will not query my Name Server for the new mx record until 48 hours have passed? I ask because i updated some MX records on route 53 and all tests show the correct NS for my domain, but the MX records are old and have not updated. It's only been about 12 hours, so i am assuming it's because the name servers had a TTL of 48 hours, and even though I moved that down to 1 hour, servers around the globe have info cached for 48 hours and thus will not query new records until then. ---------------------------------------------------------------------- thekrautboy · 2023-11-11 17:51 > I ask because i updated some MX records on route 53 and all tests show the correct NS for my domain, but the MX records are old and have not updated. It's only been about 12 hours, so i am assuming it's because the name servers had a TTL of 48 hours, and even though I moved that down to 1 hour, servers around the globe have info cached for 48 hours and thus will not query new records until then. Yes. And records have the TTL, not the nameserver itself. You could set A/AAAA records to have a very short TTL and MX to have a medium TTL etc, whatever you want. ---------------------------------------------------------------------- NGL_ItsGood · 2023-11-11 17:52 Ok, perfect thank you. I needed that sanity check lol ---------------------------------------------------------------------- zfa · 2023-11-11 20:25 To clarify: Every record has it's own ttl, and that's how long a client should (though doesn't always) cache a lookup. Having a 48hr TTL for your NS record themselves just means you'd possibly have a 48hr delay **if you changed name servers** - eg if you were using your registrars DNS then moved to Cloudflare, for example. The records held on that name server don't inherit the TTL though, they each have their own. Traditionally you set ns TTL high (for various reasons), and 'normal' record TTLs are generally pretty short these days. Plenty of clients actually ignore TTL and use their own caching values anyway now, so us actually a bit of a crapshoot as to whether they honoured. With Amazon seeing as you pay per query once you get to a steady state you probably want to set the TTL as high as you can considerably go. With providers who don't charge you want to go low. Some providers don't give you an option or have auto values such as everything being 5 min at Cloudflare.