How DNS propagation works and how long it takes

Updated

DNS propagation is the delay between changing a DNS record and everyone seeing the new value. Nothing is actually pushed out. Your DNS provider updates its authoritative servers, usually within minutes, but recursive resolvers keep serving the old answer until their cached copy reaches the end of its TTL. Most record changes show up within minutes to a few hours. Nameserver changes can take up to 48 hours.

What decides how long a change takes

How to make a DNS change take effect faster

  1. Lower the TTL of the record, for example to 300 seconds, at least one old TTL period before the change. With a one-day TTL, do this a day ahead.
  2. Make the change.
  3. Compare answers from several resolvers with the DNS propagation checker.
  4. Once the new value is stable, raise the TTL again to reduce the query load.

How to check whether a change has propagated

Start at the source. Find the domain’s authoritative nameservers with the nameserver lookup and query one directly, for example with dig @ns1.example.net example.com A. If it returns the new value, the change is live and any remaining delay is caching.

Then compare public resolvers. The propagation checker asks Cloudflare, Google and Quad9 at the same time from this server. It is a quick comparison of three large resolvers, not a test from every country.

To clear caches you control, flush your computer’s DNS cache: ipconfig /flushdns on Windows, or sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder on macOS. Cloudflare and Google also let you ask their public resolvers to drop a cached name, through Cloudflare’s purge cache page and Google Public DNS’s flush cache page.

A worked timeline

Take a website that is moving to a new server. Its A record has a TTL of one day.

Skip the first step and the change still works, but some visitors keep reaching the old server until Wednesday morning.

Why large resolvers are inconsistent for a while

A public resolver such as 8.8.8.8 is not one machine. The same address is answered from many sites around the world, and each site keeps its own cache. Two lookups a second apart can land on different machines and return different answers until both caches have expired. A result that flips between old and new is a normal sign that a change is in progress.

Moving a website without downtime

  1. Copy the site to the new server and test it there, using the server’s address or a temporary name.
  2. Install a TLS certificate on the new server before any visitors arrive.
  3. Lower the TTL and wait for the old one to pass.
  4. Change the DNS record.
  5. Leave the old server running. Visitors with a cached answer still reach it.
  6. Watch the old server’s logs. When requests stop arriving, switch it off.

If the site stores data, such as orders or comments, freeze changes or point both servers at the same database during the overlap so nothing is written to the old copy alone.

Moving email without losing messages

Mail is more forgiving than the web, because sending servers queue a message and retry for days when delivery fails. It still pays to overlap. Create the mailboxes at the new provider, change the MX records and keep the old mailboxes open until the old TTL has passed. Check both for a few days.

Update the SPF record so that it lists the old and the new provider during the move, and remove the old one afterwards.

Changing nameservers when DNSSEC is on

A signed domain needs one more step. The DS record at the registrar matches the keys of the current DNS provider. If you switch nameservers while it is in place, the new provider’s answers fail validation and the domain stops resolving for many users. Remove the DS record first, wait for it to expire from caches, then change nameservers and turn DNSSEC on again at the new provider. The DNSSEC checker confirms each stage.

Telling caching apart from a mistake

When a change does not seem to take effect, ask the domain’s authoritative nameservers directly before blaming caches. Three outcomes are possible.

Only the third case is propagation. The first two never fix themselves, however long you wait.

What a short TTL costs

A short TTL means resolvers ask your nameservers more often. For most domains the extra load is trivial, though a provider that bills per query will charge a little more. The bigger trade-off is resilience. With a long TTL, resolvers can keep answering from cache if your DNS provider has a brief outage. With a five-minute TTL, an outage is felt almost at once.

Propagation myths

Common questions

Why do I see the new website while a colleague still sees the old one?

You are probably using different resolvers, or one of you has the old answer cached locally. The change reaches each resolver as its cached copy expires.

Can I force DNS to propagate?

No. You can keep TTLs short before a change and flush the caches you control. Every other resolver picks up the change when its cache expires.

Does propagation affect email?

Yes. Sending servers use the same resolvers, so an MX change takes effect for each sender as its cached MX records expire. Keep the old mail server running until the old TTL has passed.

What TTL should I use from day to day?

An hour suits most records. Use 300 seconds for records you may need to change in a hurry, and a day for records that rarely change, such as MX.

What should I do once a change has propagated?

Raise the TTL again if you lowered it, remove records that pointed to the old service and switch off the old server once its traffic has stopped.

Why did my change appear instantly?

The resolver you used had no cached copy, or the old record had a short TTL. A brand new name also appears at once for resolvers that had never been asked about it.

Does a new TTL take effect straight away?

No. Resolvers that already hold the record keep it for the old TTL. The new value applies from the next time each one fetches the record.

Can a resolver ignore my TTL?

Some do. A few resolvers hold answers longer than the TTL allows, and some apply a minimum. Both are outside your control, which is another reason to keep the old service running for a while.