Tech note
DNS tricks for faster validation
When DNS changes are in flight, the hard part is usually not making the change. It is proving what your machine is actually resolving without waiting on the whole internet.
This note is still useful when I need to compare a new hosted zone against an existing configuration or sanity-check a Route 53 update.
Workflow
Cheaping out on the right things
Use a cheap registrar if you want, but keep DNS management in Route 53.
You can buy a low-cost nameserver on a provider like NameSilo while still delegating the actual hosted zone to Route 53.
Commands
Fast validation on macOS
Temporarily point your resolver where you want it, test, then revert.
On a Mac, networksetup -setdnsservers Wi-Fi is handy when you want to see DNS behavior quickly. When you are done, networksetup -setdnsservers Wi-Fi Empty restores the defaults.
Note: setting specific name servers can cut you off from the rest of the internet while you are testing. That is useful when you know what you are doing and annoying when you do not.
host -t TXT bellagrams.orgThe broad workflow is simple: create the hosted zone, lower TTLs when you need to move quickly, point your machine at the target DNS servers, and then confirm the text record you expect is actually visible.
- Create the hosted zone entry in Route 53.
- Lower the TTL on your A and NS records in both the new and old systems.
- Point macOS at the Route 53 DNS servers with
networksetup. - Validate local resolver settings with
cat /etc/resolv.conf. - Use
host -t TXTto inspect the hostname you are testing. - Add a TXT record with something recognizable like "Hello, world!".
- Confirm the propagated value with the same
hostcommand. - Revert the resolver back to
Emptywhen you finish.
You can also compare propagation across public resolvers with whatsmydns.net.