DEV Community

Ciarán Doyle
Ciarán Doyle

Posted on

I Changed My DNS and My Site Disappeared: A Quick Guide to DNS Propagation

You've just migrated your website to a new host. You updated the nameservers at your registrar. You triple-checked everything. And now your site is gone. Vanished. Your client is ringing you in a panic.

Don't worry. Your site is fine. It's DNS propagation, and it's completely normal.

What's actually happening

When you change DNS records - nameservers, A records, CNAME records, whatever - the change doesn't take effect instantly across the entire internet. That's because DNS is cached at multiple levels:

  1. Your browser caches DNS lookups (usually for a few minutes)
  2. Your operating system caches them too
  3. Your router might cache them
  4. Your ISP's DNS resolver caches them (this is the big one)
  5. Other DNS resolvers (Google, Cloudflare, etc.) all have their own caches

When you make a change, it updates at the authoritative nameserver immediately. But all those cached copies don't know about the change yet. They'll keep serving the old record until their cache expires.

That expiry time is controlled by the TTL (Time To Live) value on the DNS record.

TTL: the number that controls propagation speed

Every DNS record has a TTL value, measured in seconds. It tells resolvers "cache this answer for this many seconds, then check again."

Common TTL values:

  • 300 (5 minutes) - for records that change frequently
  • 3600 (1 hour) - a reasonable default
  • 86400 (24 hours) - for records that rarely change

If your A record has a TTL of 86400, it means every DNS resolver that cached it will keep the old value for up to 24 hours before checking for updates.

This is why the standard advice is "DNS propagation takes 24-48 hours." In reality, it takes exactly as long as the TTL on the old record. If your TTL was 300 seconds, most of the internet will see the change within 5-10 minutes.

The trick: lower TTL before migrating

If you know you're going to change DNS records, lower the TTL a day or two before the change:

  1. Day before migration: Change TTL from 86400 to 300
  2. Wait 24 hours (so the old high TTL expires everywhere)
  3. Make your DNS change
  4. Within 5-10 minutes, most resolvers will pick up the new value
  5. After migration is stable: raise TTL back to 3600 or whatever you prefer

This is the single most useful DNS trick I know. I do it for every migration and it saves a pile of stress.

How to check propagation progress

You're sitting there after making the change and you want to know: has it propagated?

From the command line

# Check what different resolvers see
dig @8.8.8.8 yourdomain.com A
dig @1.1.1.1 yourdomain.com A
dig @9.9.9.9 yourdomain.com A
Enter fullscreen mode Exit fullscreen mode

If they all return your new IP, you're mostly there. If some still show the old IP, those resolvers haven't refreshed their cache yet.

Using a propagation checker

For a more complete picture, use a tool that checks from multiple locations worldwide. publicdns.info has a propagation checker that queries servers across different countries simultaneously, so you can see exactly where the change has landed and where it hasn't.

This is what I pull up on screen when a client is asking "is it done yet?" - shows them the green ticks rolling in across different regions.

Common propagation problems

"My site works for me but not for my client"

Your machine probably cached the new DNS record already (or you flushed your cache). Your client's ISP resolver still has the old one cached. Just wait for their TTL to expire.

"It's been 48 hours and it still hasn't propagated"

Something else is wrong. After 48 hours, every cache in the world should have expired. Check:

  • Did you actually update the right records? (Check at your registrar, not just your DNS host)
  • Are the nameservers correct? (dig NS yourdomain.com)
  • Is there a DNSSEC issue? (Misconfigured DNSSEC can make your domain unresolvable)

"It propagated and then went back to the old value"

This can happen with load-balanced DNS or if you have conflicting records. Check that you don't have the old A record still present alongside the new one.

"My email stopped working after the DNS change"

MX records. When you change nameservers, make sure the MX records exist on the new DNS host. This catches people out all the time. Email DNS is just as important as web DNS.

Checking your current TTL

Before making any DNS change, check what TTL your records currently have:

dig yourdomain.com A | grep -A1 "ANSWER SECTION"
Enter fullscreen mode Exit fullscreen mode

The number after the record name is the TTL in seconds. If it shows 86400, you'll want to lower it before making changes.

After the change

Once propagation is complete and everything is working:

  1. Raise your TTL back to something reasonable (3600-86400)
  2. Test from multiple locations to confirm
  3. Keep the old server running for a few days as a safety net
  4. Check your email is still working (MX records)

The short version

DNS propagation isn't mysterious. It's just caching. Lower your TTL before making changes, use a propagation checker to monitor progress, and wait for the old caches to expire. Your site didn't disappear - the internet just hasn't all got the memo yet.

Top comments (0)