انتقل إلى المحتوى

الدروس DNS متوسط1 دقائق قراءة

Move a Website Without Downtime: Lower TTL Before You Migrate

Plan a zero-downtime website or email migration by lowering DNS TTLs in advance, switching records, verifying propagation and raising TTLs afterwards.

بواسطة فريق تحرير ZSOLNET آخر تحديث

هذه الصفحة غير متاحة بالعربية بعد، لذا تُعرض بالإنجليزية.

أهم النقاط

  • Lower the TTL of the records you'll change at least one full old-TTL period before the move.
  • Keep the old server running until traffic and mail have stopped arriving there.
  • Raise TTLs again once everything is stable to reduce DNS load and lookups.

DNS changes aren’t instant because resolvers cache answers for the record’s TTL. If your A record has a TTL of 86400 (one day), some visitors may reach the old server for up to a day after you switch. Lowering the TTL in advance shrinks that window to minutes.

Step 1 — Check current TTLs

Look up the records you’ll change — usually A/AAAA for the site and MX for email — with the DNS lookup tool. Note each TTL; the TTL converter turns seconds into hours.

Step 2 — Lower them early

At your DNS provider, set those records’ TTL to 300 without changing their values. Then wait at least as long as the old TTL, so every resolver’s cached copy expires.

Step 3 — Prepare the new server

Copy files, databases and mailboxes to the new hosting. Test the site before switching DNS — for example with a temporary URL or by editing your computer’s hosts file.

Step 4 — Switch the records

Update the record values to the new server. With a 300-second TTL, most visitors move within minutes. Check progress with the propagation checker.

Step 5 — Keep the old server running

Leave the old hosting active for a few days. Some resolvers and mail servers cache longer than they should, and late emails can still arrive at the old mailbox.

Step 6 — Raise TTLs again

Once everything is stable, set TTLs back to a normal value such as 3600 or 14400 seconds.

الأسئلة الشائعة

How low should the TTL be?

300 seconds (five minutes) is a common choice for a migration window. Very low values are rarely necessary.

Can I lower the TTL on nameserver changes too?

NS records at the registry are controlled by the parent zone and often have long TTLs you can't change, so plan nameserver switches with extra time.

شارك X LinkedIn Facebook

الدخول إلى حسابك

أدِر نطاقاتك واستضافتك وفواتيرك من مكان واحد.

اتصال آمن مباشرة مع منطقة العملاء في ZSOLNET.

ليس لديك حساب؟