I just discovered a clever trick that can be used to clear a negative DNS Cache entry. I sometimes need to do this if I try to use a DNS resource before I’ve actually created it. For example, when I start a new project, I often intend to use the hostname ‘app.mynewproject.com’ to run the application website. If I try to open this in a browser before creating the DNS entry, many DNS servers will cache the negative response (ie: app.mynewproject.com does NOT exist, so don’t ask the upstream server for it again), sometimes for a long time.
I’ve found that I can often create a CNAME record that points to the desired resource. When looking up the CNAME record, the authoritative server also sends the response for the record that was thought to be invalid. This must clear the cache, so a subsequent request to the previously negatively cached record then works. This is much faster than waiting for it to expire!