DNS changes in under 10 minutes
Table of Contents
Recommended basics: Articles you should know
To get the full picture of this article, you should know about this topics:
You may also want to use the content map to find interesting articles that play into this one.
Many sources say that DNS changes can take up to 24 hours to propagate. This probably is fine if you have a static website that you move from one server to another. But if you move to a new mail server or if you have a website with dynamic content changes (like comments or shop orders), this comes with many downtimes.
Today I’ll show you how you can run DNS changes in under 10 minutes, reducing any potential downtime to an manageable period. This method works on many shared hosting providers too, you don’t need any special or paid tooling.
Rapid fast DNS changes #
To run rapid fast DNS changes, you need some preparation. It’s a three-step process which leverages temporary reduced TTL to work around DNS caching.
- 2 days before your planned migration date / time (
T
), you need to reduce theTTL
down to600 seconds
for the DNS entry you want to update. - At planned date / time of your migration, change the DNS entry.
- 10 minutes later you should ensure everything is working as expected.
- One day later you can re-set
TTL
to it’s previous value (most likely86400 seconds
).
Disclaimer: Minimum TTL #
Each DNS cache can enforce a minimum TTL
. That means, instead of 600 seconds
you can also go with
60 seconds
but it is possible that this value is set to some higher value, depending on the configuration of the
DNS cache.
As far as I know the major DNS caches enforce 5 or 10
minutes TTL
. So you should be safe following this article.