January 5, 2023

While moving my blog to its new domain, I was setting up URL records from my old domain to the new one. Under the hood, URL records are a convenience service by my hosting service: they create an A record to their own redirection server, which then redirects the users to the contents of the URL record.

Weirdly, it was not working. Now, I am used to weird intermediate states when it comes to DNS records, so I patiently waited, but this one was new: dig showed me the correct records, so did every DNS tool I could find, but still, the redirect did not work as expected, even after I flushed my browser’s DNS cache.

Turns out that the browser caches more than just DNS: They also cache 301 redirects, which is exactly what the redirection server returned. So my browser was following the old redirect and never even hitting the redirection server, oblivious to the fact that the redirection URL had changed somewhere in between.