DNS Commands
Domain Name System records and resolution.All DNS pages
- Check DNS propagation from the command lineCheck DNS propagation by asking the authoritative name servers, then public resolvers, with dig. Read the TTL to know when stale answers expire, plus pitfalls.
- Flush the DNS cache on Windows, Linux and macOSFlush the DNS cache with ipconfig /flushdns on Windows, resolvectl flush-caches on Linux and dscacheutil on macOS, plus browser and router caches that remain.
- Query DNS records in Python with dnspython (A, MX, TXT)Look up A, MX and TXT records in Python with dnspython resolve(), query a specific name server, and handle NXDOMAIN, NoAnswer and LifetimeTimeout errors.
- Validate a DNS zone file before loading it (named-checkzone, dnspython)Check a DNS zone file with named-checkzone or dnspython before reloading: syntax errors, missing SOA or NS, CNAME and other data, and what each tool misses.