๐——๐—ก๐—ฆ ๐——๐—ฒ๐—ฒ๐—ฝ ๐——๐—ถ๐˜ƒ๐—ฒ ๐—ณ๐—ผ๐—ฟ ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ๐˜€

DNS failures are hard to debug. Your app looks down. Users in one city see your site while others do not. Email bounces. A deployment changes your IP but users still hit the old one.

Understanding DNS turns a 3-hour incident into a 10-minute fix.

How resolution works:

Key record types you must know:

The importance of TTL (Time to Live):

TTL tells caches how long to keep a record. It is your main tool for managing propagation.

Migration tip: Always lower your TTL before a planned change. If you change a record with a 24-hour TTL, users will see the old value for up to 24 hours. You cannot force them to update.

How to debug:

  1. Check the authoritative nameserver first. Use: dig @ns1.your-provider.com api.example.com. If this is wrong, your settings are wrong.
  2. Check major resolvers. Use: dig @8.8.8.8 api.example.com. If the authoritative server is correct but this is old, wait for the TTL to expire.
  3. Check your app server. Use: nslookup api.example.com.

Common issues:

Source: https://dev.to/veduis/dns-deep-dive-for-developers-records-ttls-and-debugging-when-resolution-breaks-49lb